diff --git a/ChangeLog b/ChangeLog index 06894f344b838d622312bfcd017176c32c56df6c..c6902e05f1278665c3ac8fc88cf9e2ae07222b14 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2014-03-31 Chris Allegretta <chrisa@asty.org> + * doc/syntax/go.nanorc: basic go syntax highlighting + 2014-03-30 Benno Schulenberg <bensberg@justemail.net> * doc/syntax/changelog.nanorc: New file, first attemp at colouring Changelog files. diff --git a/doc/syntax/go.nanorc b/doc/syntax/go.nanorc new file mode 100644 index 0000000000000000000000000000000000000000..8573a87c480f2367f076ab14c674775686b3e6bc --- /dev/null +++ b/doc/syntax/go.nanorc @@ -0,0 +1,21 @@ +## Here is an example for Python. +## +syntax "go" "\.go$" +header "^#!.*/python[-0-9._]*" + +icolor brightblue "def [0-9A-Z_]+" +color brightcyan "\<(break|default|func|interface|select|case|defer|go|map|struct|chan|else|goto|package|switch|const|fallthrough|if|range|type|continue|for|import|return|var)\>" + +## String highlighting. You will in general want your comments and +## strings to come last, because syntax highlighting rules will be +## applied in the order they are read in. +color brightyellow "<[^= ]*>" ""(\\.|[^"])*"" +## +## This string is VERY resource intensive! +color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*"" + + +## Comment highlighting +color brightblue "//.*" +color brightblue start="/\*" end="\*/" +