Skip to content

Instantly share code, notes, and snippets.

@Andersama
Last active January 15, 2024 16:54
Show Gist options
  • Save Andersama/eb7b56ac31ff9917380010ffafdb12f0 to your computer and use it in GitHub Desktop.
Save Andersama/eb7b56ac31ff9917380010ffafdb12f0 to your computer and use it in GitHub Desktop.
# Format: <SettingName>: <Settingvalue>
# Setting name must appear at start of line and there must be whitespace after the colon.
# Multiple values can be comma separated or on subsequent lines.
#
# Valid settings for colour rules:
# REGEX() A regular expression. Colours entire match or first group.
# WORD() Matches a word (case sensitive)
# WORDI() Matches a word (case insensitive)
# TEXT() Match any text in the line (case sensitive)
# TEXTI() Match any text in the line (case insensitive)
#----------------------------------------------
# settings
Extensions: .txt,.cmake
#----------------------------------------------
# colour rules
Language.Brace:
TEXT({)
TEXT(})
Language.Bracket:
TEXT(()
TEXT())
Language.SquareBracket:
TEXT([)
TEXT(])
Language.Comma:
TEXT(,)
Language.Comment:
REGEX(#.*)
Language.Keyword:
WORD(if)
WORD(endif)
WORD(else)
WORD(elseif)
WORD(foreach)
WORD(endforeach)
WORD(while)
WORD(endwhile)
WORD(function)
WORD(endfunction)
#${CMAKE_INSTALL_CONFIG_NAME}
Language.Function:
REGEX(\b([a-zA-Z_]+\w*)\s*\()
Language.String:
REGEX(L?"[^"\\]*(?:\\.[^"\\]*)*")
REGEX(L?'[^'\\]*(?:\\.[^'\\]*)*')
Language.Variable:
REGEX(\b[a-zA-Z_]+\w*\b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment