Debian Codegraph @

runtime/queries/kcl/highlights.scm

raw symbols SCIP
1 ;; Maps AST nodes (left) to highlighting classes (right)
2 ;; See https://docs.helix-editor.com/themes.html#scopes
3 ;; for the supported scopes.
4 ;; Don't forget to run the command `hx --grammar fetch` to fetch the grammars,
5 ;; and `hx --grammar build` to build any out-of-date grammars.
6
7 "fn" @keyword.function
8 "return" @keyword.control.return
9 "import" @keyword.control.import
10 "export" @keyword.control.import
11 [
12 "if"
13 "else"
14 ] @keyword.control.conditional
15 (identifier) @variable
16
17 ;; highlight type names
18 (type_name
19 (identifier) @type
20 ) @type
21
22 (fn_call
23 callee: (identifier) @function
24 (labeledArg
25 label: (identifier) @variable.parameter
26 )
27 )
28
29
30 ;; operators
31 (binary_operator) @operator
32 (prefix_operator) @operator
33
34 ;; punctuation
35
36 ; ".." @punctuation.special
37
38 "(" @punctuation.bracket
39 ")" @punctuation.bracket
40 "[" @punctuation.bracket
41 "]" @punctuation.bracket
42 "{" @punctuation.bracket
43 "}" @punctuation.bracket
44
45 ; "." @punctuation.delimiter
46 "," @punctuation.delimiter
47 ; ":" @punctuation.delimiter
48 ; ";" @punctuation.delimiter
49
50 ;; literals
51 (boolean) @constant.builtin.boolean
52 (string) @string
53 (number) @constant.numeric
54
55 ;; comments
56 (shebang) @keyword.directive
57 (comment) @comment