feat(lalrpop): highlight touchups, folds

This commit is contained in:
Riley Bruins 2024-05-05 13:51:20 -07:00 committed by Christian Clason
parent 73fdd31377
commit 4b70dde727
3 changed files with 32 additions and 18 deletions

View file

@ -0,0 +1,5 @@
[
(grammar_item)
(use)+
(action)
] @fold

View file

@ -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

View file

@ -1,3 +1,6 @@
((comment) @injection.content
(#set! injection.language "comment"))
([
(normal_action)
(failible_action)