mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-10 15:30:01 -04:00
Lalrpop support putting annotation like `#[precedence(level = "1")]`. This commit aims to highlight `precedence` with the `function.macro` highlight group, like rust does with its proc macros.
82 lines
918 B
Scheme
82 lines
918 B
Scheme
[
|
|
"enum"
|
|
"extern"
|
|
"grammar"
|
|
"match"
|
|
"type"
|
|
"pub"
|
|
] @keyword
|
|
|
|
[
|
|
"match"
|
|
"else"
|
|
] @keyword.conditional
|
|
|
|
[
|
|
"+"
|
|
"*"
|
|
"?"
|
|
; TODO: inaccessible node
|
|
; =>
|
|
"=>@L"
|
|
"=>@R"
|
|
] @operator
|
|
|
|
(grammar_type_params
|
|
[
|
|
"<"
|
|
">"
|
|
] @punctuation.bracket)
|
|
|
|
(symbol
|
|
[
|
|
"<"
|
|
">"
|
|
] @punctuation.bracket)
|
|
|
|
(binding_symbol
|
|
[
|
|
"<"
|
|
">"
|
|
] @punctuation.bracket)
|
|
|
|
(binding_symbol
|
|
name: (identifier) @variable.parameter)
|
|
|
|
(bare_symbol
|
|
(macro
|
|
(macro_id) @type.definition))
|
|
|
|
(bare_symbol
|
|
(identifier) @type.definition)
|
|
|
|
(nonterminal_name
|
|
(macro_id) @type.definition)
|
|
|
|
(nonterminal_name
|
|
(identifier) @type.definition)
|
|
|
|
(nonterminal
|
|
(type_ref) @type.builtin)
|
|
|
|
[
|
|
"("
|
|
")"
|
|
"["
|
|
"]"
|
|
] @punctuation.bracket
|
|
|
|
[
|
|
";"
|
|
":"
|
|
] @punctuation.delimiter
|
|
|
|
(lifetime
|
|
(identifier) @keyword.storage)
|
|
|
|
(string_literal) @string
|
|
|
|
(regex_literal) @string
|
|
|
|
(annotation
|
|
(id) @function.macro)
|