nvim-treesitter/queries/ebnf/highlights.scm

44 lines
545 B
Scheme
Raw Normal View History

2022-10-02 18:12:30 +02:00
;;;; Simple tokens ;;;;
(terminal) @string.grammar
(special_sequence) @string.special.grammar
(integer) @number
(comment) @comment
;;;; Identifiers ;;;;
; Allow different highlighting for specific casings
((identifier) @type
2023-04-21 04:06:20 -04:00
(#lua-match? @type "^%u"))
2022-10-02 18:12:30 +02:00
((identifier) @symbol
2023-04-21 04:06:20 -04:00
(#lua-match? @symbol "^%l"))
2022-10-02 18:12:30 +02:00
((identifier) @constant
2023-04-21 04:06:20 -04:00
(#lua-match? @constant "^%u[%u%d_]+$"))
2022-10-02 18:12:30 +02:00
;;; Punctuation ;;;;
[
";"
","
] @punctuation.delimiter
[
"|"
"*"
"-"
] @operator
"=" @keyword.operator
[
"("
")"
"["
"]"
"{"
"}"
] @punctuation.bracket