forked from zyedidia/micro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
go.yaml
61 lines (51 loc) · 1.77 KB
/
go.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
filetype: go
detect:
filename: "\\.go$"
rules:
# Conditionals and control flow
- special: "\\b(break|case|continue|default|go|goto|range|return|println|fallthrough)\\b"
- statement: "\\b(else|for|if|switch|select)\\b"
- preproc: "\\b(package|import|const|var|type|struct|func|defer|iota|make|new|copy|len|cap|panic|append|close|delete|print|recover)\\b"
- symbol.operator: "[-+/*=<>!~%&|^]|:="
# Types
- symbol: "(,|\\.)"
- type: "\\b(u?int(8|16|32|64)?|float(32|64)|complex(64|128))\\b"
- type: "\\b(uintptr|byte|rune|string|interface|bool|map|chan|error)\\b"
- type.keyword: "\\b(struct)\\b"
- constant.bool: "\\b(true|false|nil)\\b"
# Brackets
- symbol.brackets: "(\\{|\\})"
- symbol.brackets: "(\\(|\\))"
- symbol.brackets: "(\\[|\\])"
# Numbers and strings
- constant.number: "\\b([0-9]+|0x[0-9a-fA-F]*)\\b|'.'"
- constant.string:
start: "\""
end: "\""
skip: "\\\\."
rules:
- constant.specialChar: "%."
- constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
- constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
- constant.string:
start: "'"
end: "'"
skip: "\\\\."
rules:
- error: "..+"
- constant.specialChar: "%."
- constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
- constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
- constant.string:
start: "`"
end: "`"
- comment:
start: "//"
end: "$"
rules:
- todo: "(TODO|XXX|FIXME):?"
- comment:
start: "/\\*"
end: "\\*/"
rules:
- todo: "(TODO|XXX|FIXME):?"