nvim-treesitter/queries/query/highlights.scm

51 lines
1.2 KiB
Scheme
Raw Normal View History

2020-07-28 07:39:45 -05:00
(string) @string
(escape_sequence) @string.escape
(capture (identifier) @type)
(anonymous_node (identifier) @string)
(predicate name: (identifier) @function.call)
(named_node name: (identifier) @variable)
(field_definition name: (identifier) @property)
(negated_field "!" @operator (identifier) @property)
2022-09-26 10:19:02 +01:00
(comment) @comment @spell
2020-09-04 13:09:28 -05:00
(quantifier) @operator
(predicate_type) @punctuation.special
2021-04-10 15:18:44 -05:00
"." @operator
2020-09-04 13:09:28 -05:00
[
"["
"]"
"("
")"
] @punctuation.bracket
2021-04-10 15:18:44 -05:00
":" @punctuation.delimiter
["@" "#"] @punctuation.special
"_" @constant
2021-04-10 15:18:44 -05:00
2021-08-13 18:15:18 -05:00
((parameters (identifier) @number)
(#match? @number "^[-+]?[0-9]+(.[0-9]+)?$"))
((program . (comment)* . (comment) @include)
2023-05-21 11:48:08 +02:00
(#lua-match? @include "^;+ *inherits *:"))
((program . (comment)* . (comment) @preproc)
(#lua-match? @preproc "^;+ *extends *$"))
2023-12-21 15:31:40 -08:00
((predicate
name: (identifier) @_name
parameters: (parameters (string "\"" @string "\"" @string) @string.regex))
(#any-of? @_name
"match"
"not-match"
"vim-match"
"not-vim-match"
"lua-match"
"not-lua-match"))
((predicate
name: (identifier) @_name
parameters: (parameters (string "\"" @string "\"" @string) @string.regex . (string) .))
(#any-of? @_name "gsub" "not-gsub"))