You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ccat/config/go.conf

31 lines
1023 B
Plaintext

# Priority decreases going downward ie. If two regexes match the same piece of
# text, the one defined earlier will take precedence over the one defined later.
# Comments
'//.*': GRAY
'/\*[^*]*\*+(?:[^/*][^*]*\*+)*/': GRAY
# Numbers and special values
'\b\-?[0-9]*\b': MAGENTA
'\b(true|false)\b': MAGENTA
'\b(nil)\b': MAGENTA
# Strings in double quotes and backticks
'"(.*?)"': BLUE
'`(.*?)`': BLUE
# Bytes / Runes
"'(.)'": BLUE
"'\\\\(.)'": BLUE # The escape backslash needs to be escaped as well
# Assignments and comparisons
'(?:\s|\b)(=|==|!=|<=|>=)(\s|\b)' : CYAN
'(&&)|(\|\|)': CYAN
# Keywords
'\b(if|else|for|range|go|func|return|break|continue)\b': CYAN
'\b(import|var|const|type|struct)\b': CYAN
# Built-in Functions
'\b(panic|len)\b': DARKBLUE
# Functions from packages (package name and function name separated by dot)
'\b(\w*\.\w*)\b': DARKBLUE
# Data Types
'\b(bool|byte|rune|string|interface|map|chan)\b': YELLOW
'\b(u?int)(8|16|32|64)?\b': YELLOW
'\b(float)(32|64)\b': YELLOW
'\b(complex)(64|128)\b': YELLOW