-
Notifications
You must be signed in to change notification settings - Fork 8
/
highlights.scm
61 lines (52 loc) · 970 Bytes
/
highlights.scm
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
(string) @string
(type) @type
(value_path) @variable
(comment) @comment
(number_literal) @number
(range from: (number_literal) @number)
(range to: (number_literal) @number)
(command cmd_name: (identifier) @function)
(function_definition func_name: (identifier) @function)
[
(variable_declaration name: (identifier))
(parameter (identifier))
(flag (flag_name))
(flag (flag_shorthand_name))
(record_entry entry_name: (identifier))
(block_args block_param: (identifier))
] @property
; (parameter (identifier) @variable.parameter) ; -- alternative highlighting group?
(cmd_invocation) @embedded
((identifier) @constant
(#match? @constant "^[A-Z][A-Z\\d_]*$"))
[
"if"
"else"
"not"
"let"
"def"
"def-env"
"export"
"true"
"false"
"and"
"or"
] @keyword
[
; "/" Not making / an operator may lead to better highlighting?
"$"
"|"
"+"
"-"
"*"
"="
"!="
"and"
"or"
"=="
">"
] @operator
["."
","
";"
] @delimiter