dotfiles-pub/common/nano/syntax/go.nanorc

47 lines
1.7 KiB
Text
Raw Normal View History

syntax "go" "\.go$"
2022-12-11 17:17:48 +00:00
# Resets everything back to plain text coloring.
# Can be used at the start of each theme file.
color white "^.*$"
color cyan "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
color white "[(]"
color cyan "\<(append|cap|close|complex|copy|delete|imag|len)\>"
color cyan "\<(make|new|panic|print|println|protect|real|recover)\>"
color blue "\<(u?int(8|16|32|64)?|float(32|64)|complex(64|128))\>"
color blue "\<(uintptr|byte|rune|string|interface|bool|map|chan|error)\>"
color red "\<(package|import|const|var|type|struct|func|go|defer|nil|iota)\>"
color red "\<(for|range|if|else|case|default|switch|return)\>"
color red "\<(go|goto|break|continue)\>"
color brightwhite "\<(true|false)\>"
color yellow "[-+/*=<>!~%&|^]|:="
color brightwhite "\<([0-9]+|0x[0-9a-fA-F]*)\>|'.'"
color green ""(\\.|[^"])*"|'(\\.|[^'])*'"
color yellow "\\[abfnrtv'\"\\]"
color yellow "\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
color green "`[^`]*`"
2022-12-11 17:17:48 +00:00
color brightblack "(^|[[:space:]])//.*"
color brightblack start="/\*" end="\*/"
comment "//"
color brightwhite,cyan "\<TODO\>:?"
color brightwhite,cyan "\<FIXME\>:?"
color ,red "[[:space:]]+$"
color brightyellow " + +| + +"
# rainbow indent
color ,brightblack "^[[:space:]]{32}"
color ,black "^[[:space:]]{30}"
color ,brightblack "^[[:space:]]{28}"
color ,black "^[[:space:]]{26}"
color ,brightblack "^[[:space:]]{24}"
color ,black "^[[:space:]]{22}"
color ,brightblack "^[[:space:]]{20}"
color ,black "^[[:space:]]{18}"
color ,brightblack "^[[:space:]]{16}"
color ,black "^[[:space:]]{14}"
color ,brightblack "^[[:space:]]{12}"
color ,black "^[[:space:]]{10}"
color ,brightblack "^[[:space:]]{8}"
color ,black "^[[:space:]]{6}"
color ,brightblack "^[[:space:]]{4}"
color ,black "^[[:space:]]{2}"