Debian Codegraph @

runtime/queries/vim/highlights.scm

raw symbols SCIP
1 (identifier) @variable
2
3 ((identifier) @constant
4 (#match? @constant "^[A-Z][A-Z_0-9]*$"))
5
6 ; Keywords
7 [
8 "if"
9 "else"
10 "elseif"
11 "endif"
12 ] @keyword.control.conditional
13
14 [
15 "try"
16 "catch"
17 "finally"
18 "endtry"
19 "throw"
20 ] @keyword.control.exception
21
22 [
23 "for"
24 "endfor"
25 "in"
26 "while"
27 "endwhile"
28 "break"
29 "continue"
30 ] @keyword.control.repeat
31
32 [
33 "function"
34 "endfunction"
35 ] @keyword.function
36
37 ; Function related
38 (function_declaration
39 name: (_) @function)
40
41 (call_expression
42 function: (identifier) @function)
43
44 (call_expression
45 function:
46 (scoped_identifier
47 (identifier) @function))
48
49 (parameters
50 (identifier) @variable.parameter)
51
52 (default_parameter
53 (identifier) @variable.parameter)
54
55 [
56 (bang)
57 (spread)
58 ] @punctuation.special
59
60 [
61 (no_option)
62 (inv_option)
63 (default_option)
64 (option_name)
65 ] @variable.builtin
66
67 [
68 (scope)
69 "a:"
70 "$"
71 ] @namespace
72
73 ; Commands and user defined commands
74 [
75 "let"
76 "unlet"
77 "const"
78 "call"
79 "execute"
80 "normal"
81 "set"
82 "setfiletype"
83 "setlocal"
84 "silent"
85 "echo"
86 "echon"
87 "echohl"
88 "echomsg"
89 "echoerr"
90 "autocmd"
91 "augroup"
92 "return"
93 "syntax"
94 "filetype"
95 "source"
96 "lua"
97 "ruby"
98 "perl"
99 "python"
100 "highlight"
101 "command"
102 "delcommand"
103 "comclear"
104 "colorscheme"
105 "scriptencoding"
106 "startinsert"
107 "stopinsert"
108 "global"
109 "runtime"
110 "wincmd"
111 "cnext"
112 "cprevious"
113 "cNext"
114 "vertical"
115 "leftabove"
116 "aboveleft"
117 "rightbelow"
118 "belowright"
119 "topleft"
120 "botright"
121 (unknown_command_name)
122 "edit"
123 "enew"
124 "find"
125 "ex"
126 "visual"
127 "view"
128 "eval"
129 "sign"
130 ] @keyword
131
132 (map_statement
133 cmd: _ @keyword)
134
135 (keycode) @constant.character.escape
136
137 (command_name) @function.macro
138
139 ; Filetype command
140 (filetype_statement
141 [
142 "detect"
143 "plugin"
144 "indent"
145 "on"
146 "off"
147 ] @keyword)
148
149 ; Syntax command
150 (syntax_statement
151 (keyword) @string)
152
153 (syntax_statement
154 [
155 "enable"
156 "on"
157 "off"
158 "reset"
159 "case"
160 "spell"
161 "foldlevel"
162 "iskeyword"
163 "keyword"
164 "match"
165 "cluster"
166 "region"
167 "clear"
168 "include"
169 ] @keyword)
170
171 (syntax_argument
172 name: _ @keyword)
173
174 [
175 "<buffer>"
176 "<nowait>"
177 "<silent>"
178 "<script>"
179 "<expr>"
180 "<unique>"
181 ] @constant.builtin
182
183 (augroup_name) @namespace
184
185 (au_event) @constant
186
187 (normal_statement
188 (commands) @constant)
189
190 ; Highlight command
191 (hl_attribute
192 key: _ @variable.parameter
193 val: _ @constant)
194
195 (hl_group) @type
196
197 (highlight_statement
198 [
199 "default"
200 "link"
201 "clear"
202 ] @keyword)
203
204 ; Command command
205 (command) @string
206
207 (command_attribute
208 name: _ @variable.parameter)
209
210 (command_attribute
211 val: (behavior
212 _ @constant))
213
214 ; Edit command
215 (plus_plus_opt
216 val: _? @constant) @variable.parameter
217
218 (plus_cmd
219 "+" @variable.parameter) @variable.parameter
220
221 ; Runtime command
222 (runtime_statement
223 (where) @keyword.operator)
224
225 ; Colorscheme command
226 (colorscheme_statement
227 (name) @string)
228
229 ; Scriptencoding command
230 (scriptencoding_statement
231 (encoding) @string.special)
232
233 ; Literals
234 (string_literal) @string
235
236 (integer_literal) @constant.numeric.integer
237
238 (float_literal) @constant.numeric.float
239
240 (comment) @comment
241
242 (line_continuation_comment) @comment
243
244 (pattern) @string.special
245
246 (pattern_multi) @string.regexp
247
248 (filename) @string.special.path
249
250 (heredoc
251 (body) @string)
252
253 (heredoc
254 (parameter) @keyword)
255
256 [
257 (marker_definition)
258 (endmarker)
259 ] @label
260
261 (literal_dictionary
262 (literal_key) @variable.parameter)
263
264 ((scoped_identifier
265 (scope) @_scope
266 .
267 (identifier) @constant.builtin.boolean)
268 (#eq? @_scope "v:")
269 (#any-of? @constant.builtin.boolean "true" "false"))
270
271 ; Operators
272 [
273 "||"
274 "&&"
275 "&"
276 "+"
277 "-"
278 "*"
279 "/"
280 "%"
281 ".."
282 "is"
283 "isnot"
284 "=="
285 "!="
286 ">"
287 ">="
288 "<"
289 "<="
290 "=~"
291 "!~"
292 "="
293 "+="
294 "-="
295 "*="
296 "/="
297 "%="
298 ".="
299 "..="
300 "<<"
301 "=<<"
302 (match_case)
303 ] @operator
304
305 ; Some characters have different meanings based on the context
306 (unary_operation
307 "!" @operator)
308
309 (binary_operation
310 "." @operator)
311
312 ; Punctuation
313 [
314 "("
315 ")"
316 "{"
317 "}"
318 "["
319 "]"
320 "#{"
321 ] @punctuation.bracket
322
323 (field_expression
324 "." @punctuation.delimiter)
325 (field_expression field: (identifier) @variable.other.member)
326
327 [
328 ","
329 ":"
330 ] @punctuation.delimiter
331
332 (ternary_expression
333 [
334 "?"
335 ":"
336 ] @keyword.operator)
337
338 ; Options
339 ((set_value) @constant.numeric
340 (#match? @constant.numeric "^[0-9]+([.][0-9]+)?$"))
341
342 (inv_option
343 "!" @operator)
344
345 (set_item
346 "?" @operator)
347
348 ((set_item
349 option: (option_name) @_option
350 value: (set_value) @function)
351 (#any-of? @_option "tagfunc" "tfu" "completefunc" "cfu" "omnifunc" "ofu" "operatorfunc" "opfunc"))