mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 11:06:54 -04:00
feat(nickel): update highlight queries to grammar changes
This commit is contained in:
parent
a8845121f0
commit
c6d295e966
1 changed files with 62 additions and 7 deletions
|
|
@ -1,5 +1,8 @@
|
||||||
(comment) @comment @spell
|
(comment) @comment @spell
|
||||||
|
|
||||||
|
(annot_atom
|
||||||
|
doc: (static_string) @spell)
|
||||||
|
|
||||||
[
|
[
|
||||||
"forall"
|
"forall"
|
||||||
"in"
|
"in"
|
||||||
|
|
@ -7,6 +10,10 @@
|
||||||
"default"
|
"default"
|
||||||
"doc"
|
"doc"
|
||||||
"rec"
|
"rec"
|
||||||
|
"optional"
|
||||||
|
"priority"
|
||||||
|
"force"
|
||||||
|
"not_exported"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
"fun" @keyword.function
|
"fun" @keyword.function
|
||||||
|
|
@ -30,13 +37,27 @@
|
||||||
|
|
||||||
"null" @constant.builtin
|
"null" @constant.builtin
|
||||||
|
|
||||||
|
(enum_tag) @constant
|
||||||
|
|
||||||
(num_literal) @number
|
(num_literal) @number
|
||||||
|
|
||||||
(infix_op) @operator
|
[
|
||||||
|
(infix_op)
|
||||||
|
"|>"
|
||||||
|
"="
|
||||||
|
"&"
|
||||||
|
"=="
|
||||||
|
"/"
|
||||||
|
"!="
|
||||||
|
"<"
|
||||||
|
">"
|
||||||
|
"@"
|
||||||
|
".."
|
||||||
|
] @operator
|
||||||
|
|
||||||
(type_atom) @type
|
(type_atom) @type
|
||||||
|
|
||||||
(enum_tag) @variable
|
(static_string) @string
|
||||||
|
|
||||||
(chunk_literal_single) @string
|
(chunk_literal_single) @string
|
||||||
|
|
||||||
|
|
@ -51,24 +72,58 @@
|
||||||
")"
|
")"
|
||||||
"[|"
|
"[|"
|
||||||
"|]"
|
"|]"
|
||||||
|
"["
|
||||||
|
"]"
|
||||||
] @punctuation.bracket
|
] @punctuation.bracket
|
||||||
|
|
||||||
(multstr_start) @punctuation.bracket
|
[
|
||||||
|
","
|
||||||
|
"."
|
||||||
|
":"
|
||||||
|
"|"
|
||||||
|
"->"
|
||||||
|
"+"
|
||||||
|
"-"
|
||||||
|
"*"
|
||||||
|
] @punctuation.delimiter
|
||||||
|
|
||||||
(multstr_end) @punctuation.bracket
|
(multstr_start) @string
|
||||||
|
|
||||||
|
(multstr_end) @string
|
||||||
|
|
||||||
(interpolation_start) @punctuation.bracket
|
(interpolation_start) @punctuation.bracket
|
||||||
|
|
||||||
(interpolation_end) @punctuation.bracket
|
(interpolation_end) @punctuation.bracket
|
||||||
|
|
||||||
(field_decl) @variable.member
|
|
||||||
|
|
||||||
(builtin) @function.builtin
|
(builtin) @function.builtin
|
||||||
|
|
||||||
(fun_expr
|
(fun_expr
|
||||||
pats: (pattern_fun
|
pats: (pattern_fun
|
||||||
(ident) @variable.parameter))
|
(ident) @variable.parameter))
|
||||||
|
|
||||||
|
; application where the head terms is an identifier: function arg1 arg2 arg3
|
||||||
(applicative
|
(applicative
|
||||||
t1: (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))))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue