fix(queries): fold aggregate option values, highlight reserved names - #36
Open
stefanvanburen wants to merge 1 commit into
Open
fix(queries): fold aggregate option values, highlight reserved names#36stefanvanburen wants to merge 1 commit into
stefanvanburen wants to merge 1 commit into
Conversation
Two gaps left over from the query pass in #32, both query-only. - block_lit became an indent.begin in #32 but was never added to folds, so a multi-line aggregate option value indented correctly and then could not be folded. Every other brace-delimited body is foldable. - reserved "foo"; produced no highlight at all. Reserved names parse as reserved_identifier, which is its own node type rather than (string), so no rule matched them - they were the only literal in the grammar that rendered as plain text. Three highlight assertions now cover it.
stefanvanburen
marked this pull request as ready for review
August 31, 2026 22:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two query-only gaps, both left over from the query pass in #32. No grammar or parser changes.
block_litwas indentable but not foldable#32 added
block_litas anindent.begin, but it was never added tofolds.scm— so a multi-line aggregate option value indented correctly and then couldn't be folded. Every other brace-delimited body in the grammar is foldable.Before, on a message containing a multi-line option value, the fold query captured the enclosing
messageand a nestedenumbut nothing for the option body. Now:reserved "foo";had no highlight at allReserved names parse as
reserved_identifier, which is its own node type rather than(string), so no rule matched them. Only thereservedkeyword and the;were captured — reserved names were the one literal in the grammar that rendered as plain unstyled text, while every other string in the file was highlighted.Verification
Three new highlight assertions cover the reserved-name case (67 → 70).
Bottom of a 2-PR stack. Non-breaking and independent — it can merge on its own.
Stack created with GitHub Stacks CLI • Give Feedback 💬