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