Skip to content

feat: Update vendored Flix grammar and switch highlighting to Rosé Pine Moon - #19

Merged
magnus-madsen merged 2 commits into
masterfrom
update-grammar-and-highlight-theme
Aug 11, 2026
Merged

feat: Update vendored Flix grammar and switch highlighting to Rosé Pine Moon#19
magnus-madsen merged 2 commits into
masterfrom
update-grammar-and-highlight-theme

Conversation

@magnus-madsen

Copy link
Copy Markdown
Member

Two independent changes, one commit each.

Grammar

Bumps GRAMMAR_COMMIT to f4d05bb and re-fetches syntaxes/flix.tmLanguage.json. That is four commits of movement in flix/textmate since befa883, 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 with Lexer.scala with the modifier scope fixed.

Highlighting theme

Replaces catppuccin-mocha with rose-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 build is clean, and the rendered posts were checked to confirm every emitted class has a matching rule in the generated stylesheet. static/giallo.css is 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

magnus-madsen and others added 2 commits August 11, 2026 16:37
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>
@magnus-madsen magnus-madsen changed the title Update vendored Flix grammar and switch highlighting to Rosé Pine Moon feat: Update vendored Flix grammar and switch highlighting to Rosé Pine Moon Aug 11, 2026
@magnus-madsen
magnus-madsen merged commit b59585b into master Aug 11, 2026
2 checks passed
@magnus-madsen
magnus-madsen deleted the update-grammar-and-highlight-theme branch August 11, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant