Hover highlighting 0.4.1: ship a TextMate grammar

Hover cards fence their declaration snippets as systemverilog markdown,
but VS Code colors fences with a TextMate grammar and the extension
deliberately shipped none - so hovers rendered plain. One compact
lookaround-free grammar (comments, strings closing at end of line, based
and fill and real and time literals, directives then macro uses, system
tasks, all 181 keywords generated from vlog_parser::KEYWORDS with a
mutation-checked drift test) registered for both language ids. Buffers
also gain colors before the server starts; semantic tokens still win once
it does. Fence tags are pinned as a contract in hover and completion.

Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
lucioandClaude Fable 5 committed 2026-08-24 20:15:47 -07:00
1 parent e9b7510ca4
commit 302b3ed443
14 files changed
+815 -31

No files matched your search

+13 -11
View File
@@ -61,9 +61,9 @@ recreated on every run.
```
dist/
vfmt-0.4.0-aarch64-apple-darwin
vfmt-server-0.4.0-aarch64-apple-darwin
vfmt-0.4.0.vsix
vfmt-0.4.1-aarch64-apple-darwin
vfmt-server-0.4.1-aarch64-apple-darwin
vfmt-0.4.1.vsix
SHA256SUMS
```
@@ -105,17 +105,19 @@ npx @vscode/vsce package --out ../../dist/vfmt-<version>.vsix
repo and only writes its *output* to `-o`.
- `.vscodeignore` keeps `smoke.js`, `.vscode/**` and `.gitignore` out of the
package. Check that after any change to it:
`unzip -l dist/vfmt-<version>.vsix | grep smoke` must print nothing.
`unzip -l dist/vfmt-<version>.vsix | grep smoke` must print nothing, and
`unzip -l dist/vfmt-<version>.vsix | grep syntaxes` must print the grammar —
without it, hover cards ship unhighlighted.
## 5. Install / distribute
```bash
# the CLI and the server: anywhere on PATH
install -m 755 dist/vfmt-0.4.0-aarch64-apple-darwin ~/.local/bin/vfmt
install -m 755 dist/vfmt-server-0.4.0-aarch64-apple-darwin ~/.local/bin/vfmt-server
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
# the editor extension: sideload, no marketplace involved
code --install-extension dist/vfmt-0.4.0.vsix
code --install-extension dist/vfmt-0.4.1.vsix
```
Publishing the artifacts is a matter of attaching `dist/`'s contents plus
@@ -123,8 +125,8 @@ Publishing the artifacts is a matter of attaching `dist/`'s contents plus
gate is green:
```bash
git tag -a v0.4.0 -m 'vfmt 0.4.0'
git push origin v0.4.0
git tag -a v0.4.1 -m 'vfmt 0.4.1'
git push origin v0.4.1
```
## Appendix — if the owner ever publishes to a marketplace
@@ -151,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.0.vsix -p "$VSCE_TOKEN"
npx @vscode/vsce publish --packagePath dist/vfmt-0.4.1.vsix -p "$VSCE_TOKEN"
# Open VSX (VSCodium, Gitpod, Cursor): needs an Eclipse Foundation account
npx ovsx publish dist/vfmt-0.4.0.vsix -p "$OVSX_TOKEN"
npx ovsx publish dist/vfmt-0.4.1.vsix -p "$OVSX_TOKEN"
```
Both tokens are secrets. Neither belongs in this repo, in a shell history, or