@@ -1,55 +1,287 @@
1−(string) @string
1+;;; ---
2−(type) @type
2+;;; keywords
3−(value_path) @variable
3+[
4−(comment) @comment
4+ "def"
6−(number_literal) @constant.numeric
12+ "let"
7−(range from: (number_literal) @constant.numeric)
13+ "let-env"
8−(range to: (number_literal) @constant.numeric)
14+ "mut"
10−(command cmd_name: (identifier) @function)
17+ "hide-env"
11−(function_definition func_name: (identifier) @function)
14− (variable_declaration name: (identifier))
20+ "source-env"
15− (parameter (identifier))
17− (flag (flag_shorthand_name))
18− (record_entry entry_name: (identifier))
19− (block_args block_param: (identifier))
20−] @variable.other.member
21−; (parameter (identifier) @variable.parameter) ; -- alternative highlighting group?
23−(cmd_invocation) @embedded
22+ "overlay"
26−((identifier) @constant
29+ "do"
27− (#match? @constant "^[A-Z][A-Z\\d_]*$"))
34+ "match"
42+(hide_mod "hide" @keyword)
43+(decl_use "use" @keyword)
49+(overlay_list "list" @keyword.storage.modifier)
50+(overlay_hide "hide" @keyword.storage.modifier)
51+(overlay_new "new" @keyword.storage.modifier)
53+ "use" @keyword.storage.modifier
56+(ctrl_error "make" @keyword.storage.modifier)
60+(val_number) @constant.numeric
63+ "ns" "µs" "us" "ms" "sec" "min" "hr" "day" "wk"
64+ ] @variable.parameter
78+ "kib" "kiB" "kIB" "kIb" "Kib" "KIb" "KIB"
79+ "mib" "miB" "mIB" "mIb" "Mib" "MIb" "MIB"
80+ "gib" "giB" "gIB" "gIb" "Gib" "GIb" "GIB"
81+ "tib" "tiB" "tIB" "tIb" "Tib" "TIb" "TIB"
82+ "pib" "piB" "pIB" "pIb" "Pib" "PIb" "PIB"
83+ "eib" "eiB" "eIB" "eIb" "Eib" "EIb" "EIB"
84+ "zib" "ziB" "zIB" "zIb" "Zib" "ZIb" "ZIB"
85+ ] @variable.parameter
93+ "[" @punctuation.bracket
95+ "," @punctuation.delimiter
96+ (hex_digit) @constant.number
98+ "]" @punctuation.bracket
100+(val_bool) @constant.builtin
101+(val_nothing) @constant.builtin
103+(val_date) @constant.number
104+(inter_escape_sequence) @constant.character.escape
105+(escape_sequence) @constant.character.escape
112+(unescaped_interpolated_content) @string
113+(escaped_interpolated_content) @string
114+(expr_interpolated ["(" ")"] @variable.parameter)
189+(expr_unary ["not" "-"] @operator)
197+["=>" "=" "|"] @operator
38− ; "/" Not making / an operator may lead to better highlighting?
200+ "o>" "out>"
40− "|"
202+ "e+o>" "err+out>"
41− "+"
203+ "o+e>" "out+err>"
45− "!="
207+;;; punctuation
55] @punctuation.delimiter
211] @punctuation.delimiter
213+(param_short_flag "-" @punctuation.delimiter)
214+(param_long_flag ["--"] @punctuation.delimiter)
215+(long_flag ["--"] @punctuation.delimiter)
216+(param_rest "..." @punctuation.delimiter)
217+(param_type [":"] @punctuation.special)
218+(param_value ["="] @punctuation.special)
219+(param_cmd ["@"] @punctuation.special)
220+(param_opt ["?"] @punctuation.special)
226+] @punctuation.bracket
229+ (record_entry ":" @punctuation.delimiter))
233+ name: (_) @variable.parameter)
235+ name: (_) @variable.parameter)
237+ param_name: (_) @variable.parameter)
239+ (cmd_identifier) @string)
240+(param_long_flag) @variable.parameter
241+(param_short_flag) @variable.parameter
243+(short_flag) @variable.parameter
244+(long_flag) @variable.parameter
246+(scope_pattern [(wild_card) @function])
248+(cmd_identifier) @function
251+ "^" @punctuation.delimiter
258+ ["." "?"] @punctuation.delimiter
259+) @variable.parameter
262+ "$" @variable.parameter
264+ (identifier) @namespace
273+(flat_type) @type.builtin
276+ ["<" ">"] @punctuation.bracket
279+ ["record" "table"] @type.enum
280+ "<" @punctuation.bracket
281+ key: (_) @variable.parameter
282+ ["," ":"] @punctuation.delimiter
283+ ">" @punctuation.bracket