Debian Codegraph @

runtime/queries/slisp/highlights.scm

raw symbols SCIP
1 ;; Keywords
2 [ "if" "prog" ] @keyword
3
4 ;; Let binding
5 [ "let" ] @keyword
6
7 (let_bindings name: (symbol) @variable)
8
9 ;; Apply
10 (apply_stmt . (symbol) @function)
11
12 ;; Use module
13 [ "use" ] @keyword
14
15 (use_module_global (quote) . (symbol) @namespace)
16 (use_module_select (quote) . (symbol) @namespace)
17
18 ;; Val definition
19 [ "val" ] @keyword
20
21 (val_definition name: (symbol) @constant)
22
23 ;; External definitions
24 [ "ext" ] @keyword
25
26 (external_definition name: (symbol) @function)
27 (external_definition signature: (signature (symbol) @variable.parameter (dot) (external_type) @type.builtin))
28 (external_definition docstring: (string) @comment)
29 (external_definition return_type: (external_type) @type.builtin)
30
31 ;; Function definitions
32 [ "def" ] @keyword.function
33
34 (function_definition name: (symbol) @function)
35 (function_definition parameters: (parameters (symbol) @variable.parameter))
36 (function_definition docstring: (string) @comment)
37
38 ;; Macro definitions
39 [ "mac" ] @keyword
40
41 (macro_definition name: (symbol) @function)
42 (macro_definition parameters: (parameters (symbol) @variable.parameter))
43 (macro_definition docstring: (string) @comment)
44
45 ;; Lambda
46 [ "\\" ] @keyword
47
48 (lambda_stmt parameters: (parameters (symbol) @variable.parameter))
49
50 ;; Atoms
51 (char) @constant.character
52 (comment) @comment
53 (number) @constant.numeric
54 (string) @string
55
56 ;; Punctuation
57 [ "(" ")" ] @punctuation.bracket
58
59 ;; Operators
60 (dot) @operator
61 (tilde) @operator
62 (backquote) @operator
63 (quote) @operator
64 (unquote) @operator
65 (unquote_splice) @operator
66
67 ;; Highlight nil t as constant
68 [ "nil" ] @constant.builtin
69
70 ;; Highlight as t as boolean constant
71 [ "T" ] @constant.builtin.boolean
72
73 ;; Highlight variable names used in anamorphic macros.
74 [ "it" ] @variable.builtin