feat: Update vendored Flix grammar and switch highlighting to Rosé Pine Moon - #19
Merged
Merged
Conversation
Picks up the four commits flix/textmate has landed since befa883, two of which touch the grammar: function names, user-defined types and qualified calls are now scoped, and the keyword list has been resynced with Lexer.scala with the modifier scope fixed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Replaces catppuccin-mocha. Every scope the Flix grammar emits resolves to a distinct colour under this theme, which is not a given: Dracula and Synthwave resolve strings back to the plain-text foreground and Laserwave does the same to keywords, leaving those tokens unhighlighted. The comment on the theme key records both checks worth making, since neither is visible in a screenshot of some other language. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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 independent changes, one commit each.
Grammar
Bumps
GRAMMAR_COMMITtof4d05bband re-fetchessyntaxes/flix.tmLanguage.json. That is four commits of movement in flix/textmate sincebefa883, two of which touch the grammar itself: function names, user-defined types and qualified calls are now scoped, and the keyword list has been resynced withLexer.scalawith the modifier scope fixed.Highlighting theme
Replaces
catppuccin-mochawithrose-pine-moon.Choosing a theme by eye turns out to miss something. Because each span is named after the theme rule that matched it rather than after the grammar scope, a theme can quietly resolve one of the scopes a grammar leans on back to the plain-text foreground — those tokens then render with no highlighting at all, and only for the languages that use that scope. Dracula and Synthwave '84 do this to strings; Laserwave does it to keywords; Poimandres does it to both keywords and types. None of it is apparent from the theme's own screenshots.
Every scope this grammar emits —
keyword,string,comment,entity.name.type,entity.name.function,constant.numeric,constant.language— resolves to a distinct colour under Rosé Pine Moon. The comment on the theme key records that check, along with a second one on comment contrast, which several of the darker themes leave under 3:1 against their own code background.One known limitation, recorded here rather than in the config since it is a trade-off and not a defect: functions, numerics and constants all resolve to
#EA9A97, so those three do not separate from one another.Verification
zola buildis clean, and the rendered posts were checked to confirm every emitted class has a matching rule in the generated stylesheet.static/giallo.cssis gitignored and regenerated on build — note that Zola only writes it when absent, so a local checkout that already has one from a previous theme needs it deleted to pick this up.🤖 Generated with Claude Code