From 3b8d9138b480a4c0777fbbc13e51171087c9a337 Mon Sep 17 00:00:00 2001 From: Magnus Madsen Date: Tue, 11 Aug 2026 16:37:08 +0200 Subject: [PATCH 1/2] chore: update vendored Flix grammar to f4d05bb 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) --- Makefile | 2 +- syntaxes/flix.tmLanguage.json | 70 +++++++++++++++++++++++++---------- 2 files changed, 52 insertions(+), 20 deletions(-) diff --git a/Makefile b/Makefile index dbd29da..8d3c3c8 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ # To pick up grammar changes, bump the SHA below and run `make update-grammar`. # The refreshed grammar lands in the working tree, where a partial or wrong # download shows up as a diff before it can be committed. -GRAMMAR_COMMIT := befa883ecec4b0c84e436bdd176dec5475e584ab +GRAMMAR_COMMIT := f4d05bbfcd34342f76bcf135f7ae58ab7cd2dd58 GRAMMAR := syntaxes/flix.tmLanguage.json .PHONY: build-site serve update-grammar diff --git a/syntaxes/flix.tmLanguage.json b/syntaxes/flix.tmLanguage.json index fb8a0c7..9fb8d9e 100644 --- a/syntaxes/flix.tmLanguage.json +++ b/syntaxes/flix.tmLanguage.json @@ -15,6 +15,9 @@ { "include": "#constants" }, + { + "include": "#declarations" + }, { "include": "#keywords" }, @@ -33,6 +36,9 @@ { "include": "#annotations" }, + { + "include": "#functions" + }, { "include": "#types" }, @@ -45,7 +51,7 @@ "patterns": [ { "name": "constant.language.unit.flix", - "match": "\\b\\(\\)\\b" + "match": "(? Date: Tue, 11 Aug 2026 16:37:08 +0200 Subject: [PATCH 2/2] feat: highlight code with rose-pine-moon 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) --- config.toml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/config.toml b/config.toml index c2bdd53..b3b2d42 100644 --- a/config.toml +++ b/config.toml @@ -23,9 +23,13 @@ enabled = true style = "class" # The theme decides both the colours and -- since each span is named after the # theme rule that matched it, not after the grammar scope -- how finely the code -# is split up. Catppuccin is the family tabi's own syntax stylesheet was derived -# from; Mocha is its darkest member, near the value tabi gave code blocks before. -theme = "catppuccin-mocha" +# is split up. Two things are worth checking in a candidate, because neither is +# visible from a screenshot of some other language: that no scope the Flix grammar +# emits resolves back to the plain-text foreground, which is how Dracula renders +# strings and Laserwave keywords -- unhighlighted, but only for grammars that lean +# on that scope -- and that comments clear 3:1 against the code background, which +# a fair number of the darker themes do not. +theme = "rose-pine-moon" # The Flix grammar is not built in; `make` fetches it from flix/textmate. extra_grammars = ["syntaxes/flix.tmLanguage.json"]