@@ -0,0 +1,67 @@
1+(types) @type
2+(type_builtin) @type.builtin
3+"Array" @type.builtin
4+
5+(enum_tag) @constructor
6+
7+"null" @constant.builtin
8+(bool) @constant.builtin.boolean
9+(str_esc_char) @constant.character.escape
10+(num_literal) @constant.numeric
11+
12+(str_chunks) @string
13+
14+; NOTE: Nickel has no block comments
15+(comment) @comment.line
16+; Nickel doesn't use comments for documentation, ideally this would be
17+; `@documentation` or something similar
18+(annot_atom
19+ doc: (static_string) @comment.block.documentation
20+)
21+
22+(record_operand (atom (ident) @variable))
23+(let_expr
24+ "let" @keyword
25+ pat: (pattern
26+ (ident) @variable
27+ )
28+ "in" @keyword
29+)
30+(fun_expr
31+ "fun" @keyword.function
32+ pats:
33+ (pattern
34+ id: (ident) @variable.parameter
35+ )+
36+ "=>" @operator
37+)
38+(record_field) @variable.other.member
39+
40+[
41+ "."
42+] @punctuation.delimiter
43+[
44+ "{" "}"
45+ "(" ")"
46+ "[|" "|]"
47+ "[" "]"
48+] @punctuation.bracket
49+(multstr_start) @punctuation.bracket
50+(multstr_end) @punctuation.bracket
51+(interpolation_start) @punctuation.bracket
52+(interpolation_end) @punctuation.bracket
53+
54+["forall" "default" "doc"] @keyword
55+["if" "then" "else" "switch"] @keyword.control.conditional
56+"import" @keyword.control.import
57+
58+(infix_expr
59+ op: (_) @operator
60+)
61+
62+(applicative
63+ t1: (applicative
64+ (record_operand) @function
65+ )
66+)
67+(builtin) @function.builtin