From 04be0cfb37289adb84fa859e04c0c3165d8ec5a5 Mon Sep 17 00:00:00 2001 From: Guoliang Chen Date: Mon, 24 Aug 2026 20:51:06 -0700 Subject: [PATCH] Color decorators 0.4.2: #200 is a delay, not a colour VS Code's built-in default colour provider (editor.defaultColorDecorators, default auto since 1.78) pattern-matches CSS-style hex in languages where no extension provides document colours - so delay controls like #200 grew RGB swatches. The extension now ships the language-scoped configuration default "never" for [verilog] and [systemverilog]; user-overridable, invisible to every other language. Diagnosis verified on the reporting machine: no colour-provider extension installed, no server capability, no user override. Co-Authored-By: Claude Fable 5 --- CHANGELOG.md | 12 ++++++++++++ Cargo.lock | 16 ++++++++-------- Cargo.toml | 2 +- README.md | 2 +- docs/features/editor-packaging/README.md | 16 ++++++++++++++++ editors/vscode/README.md | 4 ++-- editors/vscode/package-lock.json | 4 ++-- editors/vscode/package.json | 10 +++++++++- tools/RELEASING.md | 20 ++++++++++---------- 9 files changed, 61 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef7c824..e5b7382 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,18 @@ All notable changes to vfmt are recorded here. Versions follow [semantic versioning](https://semver.org/); until 1.0 the CLI's exit codes (see `README.md`) are the only frozen contract. +## 0.4.2 — 2026-08-24 + +`#200` is a **delay, not a colour**. VS Code 1.78+ ships a built-in +"default colour decorators" provider (`editor.defaultColorDecorators`, +default `auto`): in a language where no extension provides document +colours, the editor itself pattern-matches CSS-style hex — so a delay +control like `#200` or `#1ff` grew an RGB swatch. The extension now sets +the language-scoped default `"editor.defaultColorDecorators": "never"` +for `[verilog]` and `[systemverilog]`. It is a *default*, not a lock: a +user who wants swatches back can override it per language in their own +settings. Nothing else changed. + ## 0.4.1 — 2026-08-24 Hover cards are **syntax highlighted**. The server has always sent its diff --git a/Cargo.lock b/Cargo.lock index b6f1e91..576fd40 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -217,7 +217,7 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "vfmt" -version = "0.4.1" +version = "0.4.2" dependencies = [ "rayon", "vfmt_core", @@ -228,11 +228,11 @@ dependencies = [ [[package]] name = "vfmt_core" -version = "0.4.1" +version = "0.4.2" [[package]] name = "vfmt_server" -version = "0.4.1" +version = "0.4.2" dependencies = [ "lsp-server", "lsp-types", @@ -248,14 +248,14 @@ dependencies = [ [[package]] name = "vlog_formatter" -version = "0.4.1" +version = "0.4.2" dependencies = [ "vlog_parser", ] [[package]] name = "vlog_linter" -version = "0.4.1" +version = "0.4.2" dependencies = [ "vlog_formatter", "vlog_parser", @@ -263,11 +263,11 @@ dependencies = [ [[package]] name = "vlog_parser" -version = "0.4.1" +version = "0.4.2" [[package]] name = "vlog_refactor" -version = "0.4.1" +version = "0.4.2" dependencies = [ "vlog_parser", "vlog_semantic", @@ -275,7 +275,7 @@ dependencies = [ [[package]] name = "vlog_semantic" -version = "0.4.1" +version = "0.4.2" dependencies = [ "vlog_parser", ] diff --git a/Cargo.toml b/Cargo.toml index 18e3702..ab3b343 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ members = [ ] [workspace.package] -version = "0.4.1" +version = "0.4.2" edition = "2021" license = "MIT" diff --git a/README.md b/README.md index e7a4bbc..24e80c7 100644 --- a/README.md +++ b/README.md @@ -581,7 +581,7 @@ registering the file types and starting the server: ```bash tools/release.sh # builds dist/vfmt-.vsix -code --install-extension dist/vfmt-0.4.1.vsix +code --install-extension dist/vfmt-0.4.2.vsix ``` Sideloading that `.vsix` is the supported install; the extension is not on any diff --git a/docs/features/editor-packaging/README.md b/docs/features/editor-packaging/README.md index 15b5420..807016a 100644 --- a/docs/features/editor-packaging/README.md +++ b/docs/features/editor-packaging/README.md @@ -549,6 +549,22 @@ file **and** a `.v` file, and the Developer Tools console for the absence of an mapping (read out of vim 9.1's `filetype.vim`, above). - **`code --install-extension`** — deliberate, see above. +### 2026-08-24 — lead (0.4.2): default colour decorators off for our languages + +Owner report: `#200 $finish;` (clkdivider_tb.v:24) showed an RGB colour +swatch. Diagnosis, verified on the owner's machine: no installed extension +provides document colours, `vfmt-server` advertises no colour capability, +and the owner's settings carry no override — the swatch is VS Code's +built-in default colour provider (`editor.defaultColorDecorators`, +default `auto` since 1.78, owner runs 1.134), which pattern-matches +CSS-style hex like `#200` in languages where no real provider exists. +Fix: `contributes.configurationDefaults` sets +`"editor.defaultColorDecorators": "never"` scoped to `[verilog]` and +`[systemverilog]` only — a default, user-overridable, and invisible to +every other language. Lead-authored directly (ten manifest lines; the +dev/QA loop would have added latency, not safety); verification run: +JSON parses, `vsce ls` accepts, smoke OK, full workspace suite green. + ## QA log ### 2026-08-24 — QA agent (0.4.1, the TextMate grammar) diff --git a/editors/vscode/README.md b/editors/vscode/README.md index c54abeb..f5575c3 100644 --- a/editors/vscode/README.md +++ b/editors/vscode/README.md @@ -47,14 +47,14 @@ catches "the binary moved" or "the handshake broke" without launching VS Code. ```bash npm ci # installs vscode-languageclient (the only dependency) npx @vscode/vsce package -code --install-extension vfmt-0.4.1.vsix +code --install-extension vfmt-0.4.2.vsix ``` Then reload VS Code and open a `.v`/`.sv`/`.vh`/`.svh` file. `tools/release.sh` from the repo root does all of the above (plus the release binaries and checksums) and drops the `.vsix` in `dist/`, so -`code --install-extension dist/vfmt-0.4.1.vsix` is the one-command path. +`code --install-extension dist/vfmt-0.4.2.vsix` is the one-command path. `editors/vscode/LICENSE` is a copy of the repo's MIT license and is what lets `vsce package` run without `--skip-license`. If you are packaging a fork that dropped `package.json`'s `repository` field, add `--allow-missing-repository`. diff --git a/editors/vscode/package-lock.json b/editors/vscode/package-lock.json index e9ff2cd..9db8d52 100644 --- a/editors/vscode/package-lock.json +++ b/editors/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "vfmt", - "version": "0.4.1", + "version": "0.4.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "vfmt", - "version": "0.4.1", + "version": "0.4.2", "license": "MIT", "dependencies": { "vscode-languageclient": "9.0.1" diff --git a/editors/vscode/package.json b/editors/vscode/package.json index 0f36ad5..0ef9b62 100644 --- a/editors/vscode/package.json +++ b/editors/vscode/package.json @@ -2,7 +2,7 @@ "name": "vfmt", "displayName": "vfmt — Verilog/SystemVerilog", "description": "Formatting, diagnostics, navigation and semantic highlighting for Verilog and SystemVerilog, served by the vfmt language server.", - "version": "0.4.1", + "version": "0.4.2", "publisher": "REPLACE-ME", "license": "MIT", "repository": { @@ -23,6 +23,14 @@ "onLanguage:systemverilog" ], "contributes": { + "configurationDefaults": { + "[verilog]": { + "editor.defaultColorDecorators": "never" + }, + "[systemverilog]": { + "editor.defaultColorDecorators": "never" + } + }, "languages": [ { "id": "verilog", diff --git a/tools/RELEASING.md b/tools/RELEASING.md index 482d67c..8b17439 100644 --- a/tools/RELEASING.md +++ b/tools/RELEASING.md @@ -61,9 +61,9 @@ recreated on every run. ``` dist/ - vfmt-0.4.1-aarch64-apple-darwin - vfmt-server-0.4.1-aarch64-apple-darwin - vfmt-0.4.1.vsix + vfmt-0.4.2-aarch64-apple-darwin + vfmt-server-0.4.2-aarch64-apple-darwin + vfmt-0.4.2.vsix SHA256SUMS ``` @@ -113,11 +113,11 @@ npx @vscode/vsce package --out ../../dist/vfmt-.vsix ```bash # the CLI and the server: anywhere on PATH -install -m 755 dist/vfmt-0.4.1-aarch64-apple-darwin ~/.local/bin/vfmt -install -m 755 dist/vfmt-server-0.4.1-aarch64-apple-darwin ~/.local/bin/vfmt-server +install -m 755 dist/vfmt-0.4.2-aarch64-apple-darwin ~/.local/bin/vfmt +install -m 755 dist/vfmt-server-0.4.2-aarch64-apple-darwin ~/.local/bin/vfmt-server # the editor extension: sideload, no marketplace involved -code --install-extension dist/vfmt-0.4.1.vsix +code --install-extension dist/vfmt-0.4.2.vsix ``` Publishing the artifacts is a matter of attaching `dist/`'s contents plus @@ -125,8 +125,8 @@ Publishing the artifacts is a matter of attaching `dist/`'s contents plus gate is green: ```bash -git tag -a v0.4.1 -m 'vfmt 0.4.1' -git push origin v0.4.1 +git tag -a v0.4.2 -m 'vfmt 0.4.2' +git push origin v0.4.2 ``` ## Appendix — if the owner ever publishes to a marketplace @@ -153,10 +153,10 @@ The commands themselves, once those exist: # VS Code Marketplace: needs an Azure DevOps PAT for the publisher npx @vscode/vsce publish -p "$VSCE_TOKEN" # ... or publish an already-built package -npx @vscode/vsce publish --packagePath dist/vfmt-0.4.1.vsix -p "$VSCE_TOKEN" +npx @vscode/vsce publish --packagePath dist/vfmt-0.4.2.vsix -p "$VSCE_TOKEN" # Open VSX (VSCodium, Gitpod, Cursor): needs an Eclipse Foundation account -npx ovsx publish dist/vfmt-0.4.1.vsix -p "$OVSX_TOKEN" +npx ovsx publish dist/vfmt-0.4.2.vsix -p "$OVSX_TOKEN" ``` Both tokens are secrets. Neither belongs in this repo, in a shell history, or