2016-08-25 00:15:36 +00:00
|
|
|
syntax "go" "\.go$"
|
2016-03-21 16:16:02 +00:00
|
|
|
|
2017-03-01 14:30:35 +00:00
|
|
|
##This file may need cleanup.
|
|
|
|
|
|
2017-01-23 19:06:39 +00:00
|
|
|
# Conditionals and control flow
|
2017-03-01 14:30:35 +00:00
|
|
|
color special "\b(break|case|continue|default|go|goto|range|return)\b"
|
|
|
|
|
color statement "\b(else|for|if|switch)\b"
|
|
|
|
|
color preproc "\b(package|import|const|var|type|struct|func|go|defer|iota)\b"
|
|
|
|
|
color symbol.operator "[-+/*=<>!~%&|^]|:="
|
2017-01-23 19:06:39 +00:00
|
|
|
|
|
|
|
|
# Types
|
|
|
|
|
color special "[a-zA-Z0-9]*\("
|
2017-03-01 14:30:35 +00:00
|
|
|
color symbol "(,|\.)"
|
2017-01-23 19:06:39 +00:00
|
|
|
color type "\b(u?int(8|16|32|64)?|float(32|64)|complex(64|128))\b"
|
|
|
|
|
color type "\b(uintptr|byte|rune|string|interface|bool|map|chan|error)\b"
|
2017-03-01 14:30:35 +00:00
|
|
|
##I'm... not sure, but aren't structs a type?
|
2017-03-03 16:47:03 +00:00
|
|
|
color type.keyword "\b(struct)\b"
|
2017-03-01 14:30:35 +00:00
|
|
|
color constant.bool "\b(true|false|nil)\b"
|
2017-01-23 19:06:39 +00:00
|
|
|
|
2017-02-11 02:00:31 +00:00
|
|
|
# Brackets
|
2017-03-01 14:30:35 +00:00
|
|
|
color symbol.brackets "(\{|\})"
|
|
|
|
|
color symbol.brackets "(\(|\))"
|
|
|
|
|
color symbol.brackets "(\[|\])"
|
|
|
|
|
##Redundant??
|
|
|
|
|
#color symbol.operator "!"
|
|
|
|
|
#color symbol.operator ","
|
2017-01-23 19:06:39 +00:00
|
|
|
|
|
|
|
|
# Numbers and strings
|
|
|
|
|
color constant.number "\b([0-9]+|0x[0-9a-fA-F]*)\b|'.'"
|
2016-06-22 22:51:36 +00:00
|
|
|
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"
|
2017-01-23 19:06:39 +00:00
|
|
|
color constant.specialChar "\\[abfnrtv'\"\\]"
|
|
|
|
|
color constant.specialChar "\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
|
|
|
|
|
color constant.string "`[^`]*`"
|
|
|
|
|
|
|
|
|
|
# Comments & TODOs
|
2016-03-21 20:02:58 +00:00
|
|
|
color comment "(^|[[:space:]])//.*"
|
2017-02-11 02:00:31 +00:00
|
|
|
color comment start="/\*" end="\*/"
|
2017-01-23 19:06:39 +00:00
|
|
|
color todo "(TODO|XXX|FIXME):?"
|