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

View file

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