Debian Codegraph @

runtime/queries/yuck/highlights.scm

raw symbols SCIP
1 (ident) @variable
2 (index) @variable
3
4 ; Comments
5
6 (comment) @comment
7
8 ; Operators
9
10 [
11 "+"
12 "-"
13 "*"
14 "/"
15 "%"
16 "||"
17 "&&"
18 "=="
19 "!="
20 "=~"
21 ">"
22 "<"
23 ">="
24 "<="
25 "!"
26 "?."
27 "?:"
28 ] @operator
29
30 (ternary_expression
31 ["?" ":"] @operator)
32
33 ; Punctuation
34
35 [ ":" "." "," ] @punctuation.delimiter
36
37 [ "{" "}" "[" "]" "(" ")" ] @punctuation.bracket
38
39 ; Literals
40
41 (number (float)) @constant.numeric.float
42
43 (number (integer)) @constant.numeric.integer
44
45 (boolean) @constant.builtin.boolean
46
47 ; Strings
48
49 (escape_sequence) @constant.character.escape
50
51 (string_interpolation
52 "${" @punctuation.special
53 "}" @punctuation.special)
54
55 [ (string_fragment) "\"" "'" "`" ] @string
56
57 ; Attributes & Fields
58
59 (keyword) @attribute
60
61 ; Functions
62
63 (function_call
64 name: (ident) @function)
65
66 ; Tags
67
68 ; TODO apply to every symbol in list? I think it should probably only be applied to the first child of the list
69 (list
70 (symbol) @tag)
71
72 ; Variables
73
74 (ident) @variable
75
76 (array
77 (symbol) @variable)
78
79 ; Builtin widgets
80
81 (list .
82 ((symbol) @tag.builtin
83 (#match? @tag.builtin "^(box|button|calendar|centerbox|checkbox|circular-progress|color-button|color-chooser|combo-box-text|eventbox|expander|graph|image|input|label|literal|overlay|progress|revealer|scale|scroll|transform)$")))
84
85 ; Keywords
86
87 ; I think there's a bug in tree-sitter the anchor doesn't seem to be working, see
88 ; https://github.com/tree-sitter/tree-sitter/pull/2107
89 (list .
90 ((symbol) @keyword
91 (#match? @keyword "^(defwindow|defwidget|defvar|defpoll|deflisten|geometry|children|struts)$")))
92
93 (list .
94 ((symbol) @keyword.control.import
95 (#eq? @keyword.control.import "include")))
96
97 ; Loop
98
99 (loop_widget . "for" @keyword.control.repeat . (symbol) @variable . "in" @keyword.operator . (symbol) @variable)
100
101 (loop_widget . "for" @keyword.control.repeat . (symbol) @variable . "in" @keyword.operator)