Debian Codegraph @

runtime/queries/just/highlights.scm

raw symbols SCIP
1 ; This file specifies how matched syntax patterns should be highlighted
2
3 [
4 "export"
5 "import"
6 "unexport"
7 ] @keyword.control.import
8
9 "mod" @keyword.directive
10
11 [
12 "alias"
13 "assert"
14 "eager"
15 "set"
16 "shell"
17 ] @keyword
18
19 [
20 "if"
21 "else"
22 ] @keyword.control.conditional
23
24 ; Variables
25
26 (value
27 (identifier) @variable)
28
29 (alias
30 alias_name: (identifier) @variable)
31
32 (assignment
33 name: (identifier) @variable)
34
35 (shell_variable_name) @variable
36
37 (unexport
38 name: (identifier) @variable)
39
40 ; Functions
41
42 (function
43 name: (identifier) @function)
44
45 (recipe
46 name: (identifier) @function)
47
48 (recipe_dependency
49 name: (identifier) @function)
50
51 (function_call
52 name: (identifier) @function.builtin)
53
54 ; Parameters
55
56 (attribute_named_parameter
57 name: (identifier) @variable.parameter)
58
59 (function_decl_parameters
60 (identifier) @variable.parameter)
61
62 (recipe_parameter
63 name: (identifier) @variable.parameter)
64
65 ; Namespaces
66
67 (mod
68 name: (identifier) @namespace)
69
70 (module_path
71 name: (identifier) @namespace)
72
73 ; Paths
74
75 (mod
76 (path) @string.special.path)
77
78 (import
79 (path) @string.special.path)
80
81 ; Shebangs
82
83 (shebang_line) @keyword.directive
84 (shebang_line
85 (shebang_shell) @string.special)
86
87 (shell_expanded_string
88 [
89 (expansion_short_start)
90 (expansion_long_start)
91 (expansion_long_middle)
92 (expansion_long_end)
93 ] @punctuation.special)
94
95 ; Operators
96
97 [
98 "-"
99 "-@"
100 ":"
101 ":="
102 "!"
103 "!="
104 "!~"
105 "?"
106 "@-"
107 "@"
108 "*"
109 "/"
110 "&&"
111 "+"
112 "++"
113 "="
114 "=="
115 "=~"
116 "||"
117 "$"
118 ] @operator
119
120 ; Punctuation
121
122 "," @punctuation.delimiter
123
124 [
125 "{"
126 "}"
127 "["
128 "]"
129 "("
130 ")"
131 "{{"
132 "}}"
133 ] @punctuation.bracket
134
135 [ "`" "```" ] @punctuation.special
136
137 ; Literals
138
139 ; Booleans are not allowed anywhere except in settings
140 (setting
141 (boolean) @constant.builtin.boolean)
142
143 [
144 (string)
145 (external_command)
146 ] @string
147
148 [
149 (escape_sequence)
150 (escape_variable_end)
151 ] @constant.character.escape
152
153 ; Comments
154
155 (comment) @comment.line
156
157 ; highlight known settings
158 (setting
159 name: (_) @keyword.function)
160
161 ; highlight known attributes
162 (attribute
163 name: (identifier) @attribute)
164
165 ; Numbers are part of the syntax tree, even if disallowed
166 (numeric_error) @error