Unnamed repository; edit this file 'description' to name the repository.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
;; Maps AST nodes (left) to highlighting classes (right)
;; See https://docs.helix-editor.com/themes.html#scopes
;; for the supported scopes.
;; Don't forget to run the command `hx --grammar fetch` to fetch the grammars,
;; and `hx --grammar build` to build any out-of-date grammars.

"fn" @keyword.function
"return" @keyword.control.return
"import" @keyword.control.import
"export" @keyword.control.import
[
 "if"
 "else"
 ] @keyword.control.conditional
(identifier) @variable

;; highlight type names
(type_name
  (identifier) @type
) @type

(fn_call
  callee: (identifier) @function
  (labeledArg
    label: (identifier) @variable.parameter
  )
)


;; operators
(binary_operator) @operator
(prefix_operator) @operator

;; punctuation

; ".." @punctuation.special

"(" @punctuation.bracket
")" @punctuation.bracket
"[" @punctuation.bracket
"]" @punctuation.bracket
"{" @punctuation.bracket
"}" @punctuation.bracket

; "." @punctuation.delimiter
"," @punctuation.delimiter
; ":" @punctuation.delimiter
; ";" @punctuation.delimiter

;; literals
(boolean) @constant.builtin.boolean
(string) @string
(number) @constant.numeric

;; comments
(shebang) @keyword.directive
(comment) @comment