mirror of
https://github.com/zyedidia/micro.git
synced 2026-02-06 15:10:27 +09:00
* Added title setting (Requires tcell pull!) and optimized tab display. * Added Clojure highlighting. * Changed tcell call to screen. * Fixed bad reference for getting Buffer name. * Yet another massive syntax overhaul * Tweaking and testing web syntax * More webdev goodies * Added html5 highlighting and strict html4 highlighting. * Documentation update
39 lines
1.2 KiB
Plaintext
39 lines
1.2 KiB
Plaintext
syntax "go" "\.go$"
|
|
|
|
##This file may need cleanup.
|
|
|
|
# Conditionals and control flow
|
|
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 "[-+/*=<>!~%&|^]|:="
|
|
|
|
# Types
|
|
color special "[a-zA-Z0-9]*\("
|
|
color symbol "(,|\.)"
|
|
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"
|
|
##I'm... not sure, but aren't structs a type?
|
|
color type.keyword "\b(struct)\b"
|
|
color constant.bool "\b(true|false|nil)\b"
|
|
|
|
# Brackets
|
|
color symbol.brackets "(\{|\})"
|
|
color symbol.brackets "(\(|\))"
|
|
color symbol.brackets "(\[|\])"
|
|
##Redundant??
|
|
#color symbol.operator "!"
|
|
#color symbol.operator ","
|
|
|
|
# Numbers and strings
|
|
color constant.number "\b([0-9]+|0x[0-9a-fA-F]*)\b|'.'"
|
|
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"
|
|
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
|
|
color comment "(^|[[:space:]])//.*"
|
|
color comment start="/\*" end="\*/"
|
|
color todo "(TODO|XXX|FIXME):?"
|