Templates 0.4.0: context-gated statement/item snippet completion

A template tier between index names and keywords: if / if-else / else-if
(gated on the line head, so it appears after end but not after an
identifier), case and casez with default, loops, always_ff (plain and
reset variants), always_comb, always @(...), initial, and declaration
templates - logic/localparam/parameter in .sv, wire/reg/integer twins in
.v; pathless buffers get the conservative Verilog set. One renderer
spells each body as snippet and plain text so the two cannot drift, and a
registry-wide test parses every untouched expansion. Nine overlapping
static VS Code snippets moved server-side; file-level ones stay static.

Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
lucioandClaude Fable 5 committed 2026-08-24 17:28:31 -07:00
1 parent ab89152264
commit e9b7510ca4
18 files changed
+1872 -149

No files matched your search

+10 -10
View File
@@ -61,9 +61,9 @@ recreated on every run.
```
dist/
vfmt-0.3.1-aarch64-apple-darwin
vfmt-server-0.3.1-aarch64-apple-darwin
vfmt-0.3.1.vsix
vfmt-0.4.0-aarch64-apple-darwin
vfmt-server-0.4.0-aarch64-apple-darwin
vfmt-0.4.0.vsix
SHA256SUMS
```
@@ -111,11 +111,11 @@ npx @vscode/vsce package --out ../../dist/vfmt-<version>.vsix
```bash
# the CLI and the server: anywhere on PATH
install -m 755 dist/vfmt-0.3.1-aarch64-apple-darwin ~/.local/bin/vfmt
install -m 755 dist/vfmt-server-0.3.1-aarch64-apple-darwin ~/.local/bin/vfmt-server
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
# the editor extension: sideload, no marketplace involved
code --install-extension dist/vfmt-0.3.1.vsix
code --install-extension dist/vfmt-0.4.0.vsix
```
Publishing the artifacts is a matter of attaching `dist/`'s contents plus
@@ -123,8 +123,8 @@ Publishing the artifacts is a matter of attaching `dist/`'s contents plus
gate is green:
```bash
git tag -a v0.3.1 -m 'vfmt 0.3.1'
git push origin v0.3.1
git tag -a v0.4.0 -m 'vfmt 0.4.0'
git push origin v0.4.0
```
## Appendix — if the owner ever publishes to a marketplace
@@ -151,10 +151,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.3.1.vsix -p "$VSCE_TOKEN"
npx @vscode/vsce publish --packagePath dist/vfmt-0.4.0.vsix -p "$VSCE_TOKEN"
# Open VSX (VSCodium, Gitpod, Cursor): needs an Eclipse Foundation account
npx ovsx publish dist/vfmt-0.3.1.vsix -p "$OVSX_TOKEN"
npx ovsx publish dist/vfmt-0.4.0.vsix -p "$OVSX_TOKEN"
```
Both tokens are secrets. Neither belongs in this repo, in a shell history, or