helix-mirror/runtime/queries/nickel/highlights.scm

71 lines
1.3 KiB
Scheme
Raw Normal View History

2022-04-20 18:31:59 +04:00
(types) @type
(type_builtin) @type.builtin
"Array" @type.builtin
(enum_tag) @constructor
"null" @constant.builtin
(bool) @constant.builtin.boolean
(str_esc_char) @constant.character.escape
(num_literal) @constant.numeric
(str_chunks) @string
; NOTE: Nickel has no block comments
(comment) @comment.line
; Nickel doesn't use comments for documentation, ideally this would be
; `@documentation` or something similar
(annot_atom
doc: (static_string) @comment.block.documentation
)
(record_operand (atom (ident) @variable))
(let_in_block
2022-04-20 18:31:59 +04:00
"let" @keyword
"rec"? @keyword
2024-09-29 16:30:50 +04:00
"in" @keyword
)
(let_binding
2022-04-20 18:31:59 +04:00
pat: (pattern
(ident) @variable
)
)
2024-09-29 16:30:50 +04:00
2022-04-20 18:31:59 +04:00
(fun_expr
"fun" @keyword.function
pats:
2024-09-29 16:30:50 +04:00
(pattern_fun (ident) @variable.parameter)+
2022-04-20 18:31:59 +04:00
"=>" @operator
)
(record_field) @variable.other.member
[
"."
] @punctuation.delimiter
[
"{" "}"
"(" ")"
"[|" "|]"
"[" "]"
] @punctuation.bracket
(multstr_start) @punctuation.bracket
(multstr_end) @punctuation.bracket
(interpolation_start) @punctuation.bracket
(interpolation_end) @punctuation.bracket
["forall" "default" "doc"] @keyword
["if" "then" "else" "match"] @keyword.control.conditional
2022-04-20 18:31:59 +04:00
"import" @keyword.control.import
(infix_expr
op: (_) @operator
)
(applicative
t1: (applicative
(record_operand) @function
)
)
(builtin) @function.builtin