diff --git a/syntax/go.nanorc b/syntax/go.nanorc index c8fb2bb2..c6311439 100644 --- a/syntax/go.nanorc +++ b/syntax/go.nanorc @@ -7,7 +7,8 @@ formatter gofmt -w # Types. color green "\<(bool|u?int(8|16|32|64)?|float(32|64)|complex(64|128)|byte|rune|uintptr|string|error)\>" -color green "\<((<-[[:space:]]*)chan|chan[[:space:]]*<-|const|func|interface|map|struct|type|var)\>" +color green "\<(chan|const|func|interface|map|struct|type|var)\>" +color green "<-[[:space:]]*chan\>|\" @@ -20,7 +21,6 @@ color magenta "\<(break|continue|fallthrough|goto|return)\>" # Declarations. color brightcyan "\<(package|import)\>" -color brightcyan "//[[:space:]]*\+build[[:space:]]+(([a-zA-Z_0-9]+[[:space:]]*)+,[[:space:]]*)*[a-zA-Z_0-9]+" # Literals. color red "\<([1-9][0-9]*|0[0-7]*|0[xX][0-9A-Fa-f]+)\>" @@ -39,5 +39,8 @@ color red start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*"" color brightblue "//.*" color brightblue start="/\*" end="\*/" +# Special comments. +color brightcyan "//[[:space:]]*\+build[[:space:]]+(([a-zA-Z_0-9]+[[:space:]]*)+,[[:space:]]*)*[a-zA-Z_0-9]+" + # Trailing whitespace. color ,green "[[:space:]]+$"