mirror of
https://github.com/nvim-treesitter/nvim-treesitter
synced 2024-09-16 14:34:05 +02: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
|
||||
|
||||
[
|
||||
|
@ -8,6 +10,7 @@
|
|||
[
|
||||
"pub"
|
||||
"extern"
|
||||
(mut)
|
||||
] @keyword.modifier
|
||||
|
||||
[
|
||||
|
@ -23,29 +26,26 @@
|
|||
; =>
|
||||
"=>@L"
|
||||
"=>@R"
|
||||
"="
|
||||
"&"
|
||||
] @operator
|
||||
|
||||
(grammar_type_params
|
||||
[
|
||||
"<"
|
||||
">"
|
||||
] @punctuation.bracket)
|
||||
|
||||
(symbol
|
||||
[
|
||||
"<"
|
||||
">"
|
||||
] @punctuation.bracket)
|
||||
|
||||
(binding_symbol
|
||||
[
|
||||
"<"
|
||||
">"
|
||||
] @punctuation.bracket)
|
||||
|
||||
(binding_symbol
|
||||
name: (identifier) @variable.parameter)
|
||||
|
||||
(annotation
|
||||
"#" @punctuation.special)
|
||||
|
||||
(grammar_parameter
|
||||
(identifier) @variable.parameter)
|
||||
|
||||
(associated_type
|
||||
(identifier) @type)
|
||||
|
||||
(parametrized_type
|
||||
(path
|
||||
(identifier) @type))
|
||||
|
||||
(bare_symbol
|
||||
(macro
|
||||
(macro_id) @type.definition))
|
||||
|
@ -67,11 +67,17 @@
|
|||
")"
|
||||
"["
|
||||
"]"
|
||||
"}"
|
||||
"{"
|
||||
">"
|
||||
"<"
|
||||
] @punctuation.bracket
|
||||
|
||||
[
|
||||
";"
|
||||
":"
|
||||
"::"
|
||||
","
|
||||
] @punctuation.delimiter
|
||||
|
||||
(lifetime
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
((comment) @injection.content
|
||||
(#set! injection.language "comment"))
|
||||
|
||||
([
|
||||
(normal_action)
|
||||
(failible_action)
|
||||
|
|
Loading…
Reference in a new issue