mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
fix(nickel): update highlights to grammar change
This commit is contained in:
parent
b033ab331c
commit
93cc60bc5d
2 changed files with 58 additions and 7 deletions
|
|
@ -1421,7 +1421,7 @@ return {
|
|||
},
|
||||
nickel = {
|
||||
install_info = {
|
||||
revision = 'a0a5d98a6f0edb5d00a18e62e7d1d02a5607c391',
|
||||
revision = 'b5b6cc3bc7b9ea19f78fed264190685419cd17a8',
|
||||
url = 'https://github.com/nickel-lang/tree-sitter-nickel',
|
||||
},
|
||||
tier = 2,
|
||||
|
|
|
|||
|
|
@ -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,14 +37,24 @@
|
|||
|
||||
"null" @constant.builtin
|
||||
|
||||
(enum_tag) @constant
|
||||
|
||||
(num_literal) @number
|
||||
|
||||
(infix_op) @operator
|
||||
[
|
||||
(infix_op)
|
||||
"|>"
|
||||
"="
|
||||
"&"
|
||||
"=="
|
||||
"/"
|
||||
"!="
|
||||
"<"
|
||||
">"
|
||||
] @operator
|
||||
|
||||
(type_atom) @type
|
||||
|
||||
(enum_tag) @variable
|
||||
|
||||
(chunk_literal_single) @string
|
||||
|
||||
(chunk_literal_multi) @string
|
||||
|
|
@ -51,8 +68,21 @@
|
|||
")"
|
||||
"[|"
|
||||
"|]"
|
||||
"["
|
||||
"]"
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
","
|
||||
"."
|
||||
":"
|
||||
"|"
|
||||
"->"
|
||||
"+"
|
||||
"-"
|
||||
"*"
|
||||
] @punctuation.delimiter
|
||||
|
||||
(multstr_start) @punctuation.bracket
|
||||
|
||||
(multstr_end) @punctuation.bracket
|
||||
|
|
@ -61,14 +91,35 @@
|
|||
|
||||
(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))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue