1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 03:00:06 +08:00
SpaceVim/bundle/nvim-treesitter/queries/ebnf/highlights.scm

44 lines
545 B
Scheme

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