mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-19 11:50:09 -04:00
feat(lalrpop): highlight touchups, folds
This commit is contained in:
parent
73fdd31377
commit
4b70dde727
3 changed files with 32 additions and 18 deletions
5
queries/lalrpop/folds.scm
Normal file
5
queries/lalrpop/folds.scm
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
[
|
||||||
|
(grammar_item)
|
||||||
|
(use)+
|
||||||
|
(action)
|
||||||
|
] @fold
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
(comment) @comment @spell
|
||||||
|
|
||||||
"grammar" @keyword
|
"grammar" @keyword
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
@ -8,6 +10,7 @@
|
||||||
[
|
[
|
||||||
"pub"
|
"pub"
|
||||||
"extern"
|
"extern"
|
||||||
|
(mut)
|
||||||
] @keyword.modifier
|
] @keyword.modifier
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
@ -23,29 +26,26 @@
|
||||||
; =>
|
; =>
|
||||||
"=>@L"
|
"=>@L"
|
||||||
"=>@R"
|
"=>@R"
|
||||||
|
"="
|
||||||
|
"&"
|
||||||
] @operator
|
] @operator
|
||||||
|
|
||||||
(grammar_type_params
|
|
||||||
[
|
|
||||||
"<"
|
|
||||||
">"
|
|
||||||
] @punctuation.bracket)
|
|
||||||
|
|
||||||
(symbol
|
|
||||||
[
|
|
||||||
"<"
|
|
||||||
">"
|
|
||||||
] @punctuation.bracket)
|
|
||||||
|
|
||||||
(binding_symbol
|
|
||||||
[
|
|
||||||
"<"
|
|
||||||
">"
|
|
||||||
] @punctuation.bracket)
|
|
||||||
|
|
||||||
(binding_symbol
|
(binding_symbol
|
||||||
name: (identifier) @variable.parameter)
|
name: (identifier) @variable.parameter)
|
||||||
|
|
||||||
|
(annotation
|
||||||
|
"#" @punctuation.special)
|
||||||
|
|
||||||
|
(grammar_parameter
|
||||||
|
(identifier) @variable.parameter)
|
||||||
|
|
||||||
|
(associated_type
|
||||||
|
(identifier) @type)
|
||||||
|
|
||||||
|
(parametrized_type
|
||||||
|
(path
|
||||||
|
(identifier) @type))
|
||||||
|
|
||||||
(bare_symbol
|
(bare_symbol
|
||||||
(macro
|
(macro
|
||||||
(macro_id) @type.definition))
|
(macro_id) @type.definition))
|
||||||
|
|
@ -67,11 +67,17 @@
|
||||||
")"
|
")"
|
||||||
"["
|
"["
|
||||||
"]"
|
"]"
|
||||||
|
"}"
|
||||||
|
"{"
|
||||||
|
">"
|
||||||
|
"<"
|
||||||
] @punctuation.bracket
|
] @punctuation.bracket
|
||||||
|
|
||||||
[
|
[
|
||||||
";"
|
";"
|
||||||
":"
|
":"
|
||||||
|
"::"
|
||||||
|
","
|
||||||
] @punctuation.delimiter
|
] @punctuation.delimiter
|
||||||
|
|
||||||
(lifetime
|
(lifetime
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
((comment) @injection.content
|
||||||
|
(#set! injection.language "comment"))
|
||||||
|
|
||||||
([
|
([
|
||||||
(normal_action)
|
(normal_action)
|
||||||
(failible_action)
|
(failible_action)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue