diff options
| author | Salomon Popp <hi@salomonpopp.me> | 2026-02-25 10:06:48 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-25 10:06:48 +0100 |
| commit | c6d295e96698b14c344a62a3abcf64139268c56b (patch) | |
| tree | 95bba493ce0b1c38ef9bac670bbd979f063d80e5 | |
| parent | fix(c_sharp): missing highlight for lambda modifier (#8526) (diff) | |
| download | nvim-treesitter-c6d295e96698b14c344a62a3abcf64139268c56b.tar nvim-treesitter-c6d295e96698b14c344a62a3abcf64139268c56b.tar.gz nvim-treesitter-c6d295e96698b14c344a62a3abcf64139268c56b.tar.bz2 nvim-treesitter-c6d295e96698b14c344a62a3abcf64139268c56b.tar.lz nvim-treesitter-c6d295e96698b14c344a62a3abcf64139268c56b.tar.xz nvim-treesitter-c6d295e96698b14c344a62a3abcf64139268c56b.tar.zst nvim-treesitter-c6d295e96698b14c344a62a3abcf64139268c56b.zip | |
feat(nickel): update highlight queries to grammar changes
| -rw-r--r-- | runtime/queries/nickel/highlights.scm | 69 |
1 files changed, 62 insertions, 7 deletions
diff --git a/runtime/queries/nickel/highlights.scm b/runtime/queries/nickel/highlights.scm index c5ebfe166..20b52b30e 100644 --- a/runtime/queries/nickel/highlights.scm +++ b/runtime/queries/nickel/highlights.scm @@ -1,5 +1,8 @@ (comment) @comment @spell +(annot_atom + doc: (static_string) @spell) + [ "forall" "in" @@ -7,6 +10,10 @@ "default" "doc" "rec" + "optional" + "priority" + "force" + "not_exported" ] @keyword "fun" @keyword.function @@ -30,13 +37,27 @@ "null" @constant.builtin +(enum_tag) @constant + (num_literal) @number -(infix_op) @operator +[ + (infix_op) + "|>" + "=" + "&" + "==" + "/" + "!=" + "<" + ">" + "@" + ".." +] @operator (type_atom) @type -(enum_tag) @variable +(static_string) @string (chunk_literal_single) @string @@ -51,24 +72,58 @@ ")" "[|" "|]" + "[" + "]" ] @punctuation.bracket -(multstr_start) @punctuation.bracket +[ + "," + "." + ":" + "|" + "->" + "+" + "-" + "*" +] @punctuation.delimiter + +(multstr_start) @string -(multstr_end) @punctuation.bracket +(multstr_end) @string (interpolation_start) @punctuation.bracket (interpolation_end) @punctuation.bracket -(field_decl) @variable.member - (builtin) @function.builtin (fun_expr pats: (pattern_fun (ident) @variable.parameter)) +; application where the head terms is an identifier: function arg1 arg2 arg3 (applicative t1: (applicative - (record_operand) @function)) + . + (record_operand + (atom + (ident))) @function)) + +; application where the head terms is a record field path: foo.bar.function arg1 arg2 arg3 +(applicative + t1: (applicative + . + (record_operand + (record_operation_chain)) @function)) + +(str_chunks) @string + +(field_path_elem) @property + +(infix_expr + op: (infix_b_op_6) + t2: (infix_expr + (applicative + . + (record_operand + (record_operation_chain) @function)))) |
