Commit Graph
22 Commits
Author SHA1 Message Date
lucioandClaude Fable 5 80b9afdfe3 LSP §9b: willSaveWaitUntil — protocol-native format-on-save
textDocument/willSaveWaitUntil is advertised and served, gated on a new
lucisv.formatOnSave setting that defaults to off (a server that formats
uninvited fights the editor's own format-on-save and doubles up); the
decline is one comparison, before any buffer lookup. When on, the hook
is textDocument/formatting with a different trigger: the same engine,
the same all-or-nothing verified-output contract, settings resolved by
the new format::settings_without_editor_options — the ladder minus the
tabSize rung the protocol simply does not carry here, with the honest
consequence (save-format can differ from manual format without a
lucisv.toml) documented in the README, the VS Code setting description
and the nvim README. Every save reason formats; refusals are shown per
save, on purpose.

18 tests added across settings/format/server/e2e, including QA's
executable proofs of the tab-size gap and its lucisv.toml resolution, a
no-reindex/no-generation-bump guard for the new setting, and an
idempotency round-trip through a real didChange. QA also fixed the
stale 'not advertised' feature list in editors/nvim/README.md and
sharpened the config-warning dedup claim to what the code does (once
per buffer state) — reworded in the README, pinned by test.

docs/features/will-save-wait-until/README.md

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-26 12:21:00 -07:00
lucioandClaude Fable 5 aa303ce9ae LSP §9a: applyEdit compliance, pull diagnostics, expand selection; v0.8.0
release / build-and-publish (push) Successful in 3m29s
The three top findings of the LSP 3.18 audit (TODO.md §9), one round of
dev (Opus) + QA (Sonnet) + lead review:

- executeCommand now pushes its WorkspaceEdit as workspace/applyEdit and
  reads the client's verdict; the old return-the-edit behavior stays as
  the documented fallback for clients without the capability. This fixes
  the three port commands doing nothing in stock clients — the returned
  edit was dropped by vscode-languageclient and Neovim alike.
  docs/features/apply-edit/README.md
- textDocument/diagnostic + workspace/diagnostic (LSP 3.17), served from
  the same parse+lint pass the push model publishes, with resultId /
  unchanged caching on one generation counter; a pulling client is pushed
  nothing, a pushing client is unchanged. QA's exhaustive input trace
  found no stale-unchanged path. docs/features/pull-diagnostics/README.md
- textDocument/selectionRange: chains from token spans, the tolerant
  parse's item/statement spans and the scope-pair matcher, filtered to
  strict nesting; the invariant swept over all 860 corpus files (6,880
  positions, held everywhere). docs/features/selection-range/README.md

43 tests added across unit/e2e (server 557 -> 594+ unit, 29 -> 32 e2e);
fmt/clippy/test/smoke all clean, re-verified independently by QA and by
the lead.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-26 11:06:51 -07:00
lucioandClaude Fable 5 c556a13857 CI: corpus score is a gate, releases audit their artifacts; v0.7.2
ci / checks (push) Successful in 36s
ci / corpus (push) Successful in 26s
release / build-and-publish (push) Successful in 3m7s
The corpus job scores the pinned-rev corpus (cached at
~/.cache/lucisv-corpus on the runner, fetched once on a miss) on every
push and fails below scripts/corpus-baseline (813) or on any
verification error / crash. The release workflow now runs
tools/audit_artifacts.sh before publishing: musl must be fully static,
linux-gnu's glibc ceiling must stay <= 2.28 (RHEL 8), every file must be
the object format its name claims — verified against the 10 real v0.7.1
release binaries. Linux execution under Docker was considered and
declined: no container runtime on the runner. Version 0.7.2 with a
changelog covering this, the printer column fix and the README truth
pass.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-26 02:13:04 -07:00
lucioandClaude Fable 5 19253c105b CI on Gitea Actions: checks on push, full cross-platform release on tag; v0.7.1
ci / checks (push) Successful in 41s
release / build-and-publish (push) Successful in 3m12s
.gitea/workflows/ci.yml runs fmt/clippy/test on every master push and PR
on the self-hosted mac-arm64 runner (host mode, brew-serviced act_runner).
.gitea/workflows/release.yml turns a vX.Y.Z tag into a Gitea release:
tools/release.sh --cross (Apple Silicon + x86_64 macOS, musl and RHEL 8
linux-gnu, Windows; both binaries; .vsix; SHA256SUMS), a tag-vs-version
check, tools/release_notes.sh (the CHANGELOG section becomes the notes;
missing section fails the release) and tools/publish_release.sh
(get-or-create + attach, re-run safe). Version bumped to 0.7.1 with a
changelog covering directive-split and this flow.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-26 01:51:45 -07:00
lucio eeaffafd56 Rename the tool to lucisv (Language Utility for Coding In SystemVerilog) 2026-08-25 23:36:00 -07:00
lucioandClaude Fable 5 a284e33110 v0.7.0: aligned ghost text, designer trigger set
Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-25 16:13:42 -07:00
lucioandClaude Fable 5 765cd010c2 Inline templates round 2: aligned snippets, the designer trigger set
User report: accepted ghost text left `end` deeper than its opener.
Root cause proven from VS Code source: SnippetSession.adjustWhitespace
(default on, no opt-out on the inline-accept path) prepends the trigger
line's indent to snippet lines 2+, and the server baked it in too —
double indent. Fix is asymmetric because the protocols differ: ghost
bodies now emit relative indentation (one \t per step, editor settings
place it); the completion popup — latently double-indented since 0.4.0 —
keeps its absolute layout and sends insertTextMode: asIs, the opt-out
only that path has. QA modeled the normalization independently from the
same source; closer-lands-level is pinned per trigger, depth and
tab/space config.

Trigger table grows to the RTL set: case/casez/casex -> endcase (paren+
scope gate), for ( dialect-split, while (, always_ff @( (SV), always @(
offering posedge then *) as two cycleable items, fork -> join,
generate -> endgenerate, module -> named endmodule. Openers are token
sequences now; hygiene tests generalized (accepted-text-parses models
the editor's insertion; scope-balance and gate-matches-body derived
tests). 1644 tests green.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-25 16:13:19 -07:00
lucioandClaude Fable 5 df53ecea2c v0.6.0: the ghost-text release
Inline templates (M15) and the linear pairs::analyze fix, released
together. Version bumped across workspace, extension and docs; changelog
entry; dist/ rebuilt for all five targets plus the vsix.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-25 14:55:53 -07:00
lucioandClaude Fable 5 9d47b6d02b Inline templates M15: ghost text finishes the block you open
textDocument/inlineCompletion (LSP 3.18): typing `if (` offers grey
`) begin … end` and a line-ending `begin` offers its `end`; Tab accepts
as a snippet, cursor in the condition first, indented body second.
Token-based triggers (comments/strings/identifiers never fire), offered
only while the construct is really unclosed (paren stack, pairs.rs for
begin/end). Response types hand-rolled: lsp-types 0.97's item is the old
draft, and vscode-languageclient 9 only makes a SnippetString from
insertText {kind:"snippet"} — shape pinned in unit, e2e and smoke tests.
vfmt.inlineTemplates (default on) turns it off; VS Code extension opts
into the proposed client feature. QA: Eof-sentinel fix so a trigger at
the true end of file still offers.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-25 13:30:43 -07:00
lucioandClaude Fable 5 a9d73913f5 Cross-platform release: x86_64 macOS, Linux, Windows; author metadata
tools/release.sh --cross builds, next to the host Apple Silicon pair,
x86_64-apple-darwin (runs under Rosetta here, full smoke passed),
x86_64-unknown-linux-musl (static, no glibc dependency) and
x86_64-pc-windows-gnu (.exe depending only on DLLs Windows 10+ ships,
audited). The rustup stable toolchain is addressed by absolute path so
the Homebrew rust on PATH keeps owning day-to-day builds; the musl link
needs DYLD_FALLBACK_LIBRARY_PATH for rust-lld's libLLVM, the Windows
link needs mingw-w64's import libraries - both encoded in the script and
RELEASING.md so nobody rediscovers them. Author metadata: Cargo.toml
authors, package.json publisher guoliangchen + author, LICENSE holder -
all Guoliang Chen.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-25 10:33:15 -07:00
lucioandClaude Fable 5 d26f08335b Macro expansion M14: hover shows the one-step expansion; v0.5.0
Hovering `NAME(args) now appends an expands-to section: the definition
the card already chose (single_step is blind to lookup, so they cannot
disagree) with parameters substituted by the call's arguments - one
step, so nested macro names stay as written. Strings, `" markers and
escaped identifiers are never substituted into; count mismatches,
unnarrowed multiple candidates and paren-less function-like uses get no
section rather than a guess; an empty argument takes the parameter's
declared default. 2000-char cap with a note. Version 0.5.0 closes the
M7-M14 navigation run with a CHANGELOG entry covering all eight.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-25 03:14:49 -07:00
lucioandClaude Fable 5 04be0cfb37 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 <[email protected]>
2026-08-24 20:51:06 -07:00
lucioandClaude Fable 5 302b3ed443 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]>
2026-08-24 20:15:47 -07:00
lucioandClaude Fable 5 e9b7510ca4 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]>
2026-08-24 17:28:31 -07:00
lucioandClaude Fable 5 ab89152264 Rainbow 0.3.1: never paint begin/end invisible; unmatched go red
The rainbow painted depth 3-5 pairs with editorBracketHighlight
.foreground4..6, whose VS Code defaults are fully transparent — a begin
typed three levels deep vanished with its end. The extension now uses
contributed vfmt.rainbow1..6 colors with opaque defaults in every theme
variant (dark/light/HC/HC-light), and vfmt/scopePairs additionally
reports genuinely unmatched begin/end/fork/join tokens, painted
vfmt.rainbowUnmatched bright red — file characters are never hidden.
Matched pairs, depths and 78eeef6's counting are unchanged.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-24 15:45:54 -07:00
lucioandClaude Fable 5 d8e37086df Refactoring M5: keyword + project-wide identifier completion; v0.3.0
Five completion tiers in one response: module skeletons (M4, unchanged
gate), scope-visible symbols with real kinds, workspace-index names and
`define macros (backtick-aware, never inventing punctuation), Verilog/SV
keywords (single-source KEYWORDS list factored from the lexer's table,
lexing unchanged), and token-harvested project words — comments and
strings contribute nothing and get no completions. Candidate tables build
with the index over the M1 scope ladder (94 ms / 860 files, ~1.4 MiB);
a keystroke answers in ~300 µs, budget-tested. Version 0.3.0 across the
workspace and extension, CHANGELOG covers the M1-M5 refactoring layer.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-24 15:07:57 -07:00
lucioandClaude Fable 5 315bbf23ab Refactoring M1: EDA filelist (.f) defines the index scope
Rope-port umbrella plan (docs/features/refactor) + TODO.md §8; M1 ships
vfmt_core::filelist (-f nesting with cycle + 256-depth guard, +incdir+/
+define+ recorded, env vars, warnings not errors), the vfmt.toml filelist
key, the server scope ladder (filelist > workspace walk > open file's
directory when rootless) and the vfmt.filelist VS Code setting.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-24 04:11:45 -07:00
lucioandClaude Fable 5 9a3a92cabb Expose vfmt.toml settings in VS Code: vfmt.lineLength, vfmt.indent, vfmt.exclude
All three vfmt.toml keys, pushed over workspace/didChangeConfiguration
(initial push verified against the real vscode-languageclient 9.0.1).
Precedence: vfmt.toml > vfmt.* settings > editor tabSize > built-in
default — a checked-in config stays authoritative so format-on-save never
diverges from CI. Invalid values are ignored, never clamped or coerced;
exclude is appended to the config's excludes and re-indexes the workspace
on change. Untitled buffers and toml-less projects gain an editor-set
line length, previously impossible over LSP.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-24 03:15:54 -07:00
lucioandClaude Fable 5 aa26e5e427 Rainbow begin/end: vfmt/scopePairs request + themed depth decorations
Server: custom vfmt/scopePairs request returning every begin/end and
fork/join* pair with its nesting depth (UTF-16 ranges); wire shape pinned
by a literal-JSON test and by smoke.js over a real spawned server.

Extension: paints each depth with the theme's own bracket palette
(editorBracketHighlight.foreground1..6), debounced 250 ms, with a
document.version staleness guard; vfmt.rainbowBeginEnd setting (default
on) honored immediately in both directions.

Corpus sweep: 8,146 block pairs across 859 files, max depth 13, worst
request 2.1 ms (picorv32.v).

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-24 02:23:22 -07:00
lucioandClaude Fable 5 de8a307e00 VS Code: snippet templates for common Verilog/SV constructs
30 snippets across both language ids: module, always/always_ff/always_comb
with reset, case-with-default, FSM skeleton, interface with modports,
package, class, assert property, testbench, include guard, and more.
All 30 rendered bodies parse with vfmt itself; $-escaping verified by
round-tripping through the VS Code snippet grammar.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-24 01:42:48 -07:00
lucioandClaude Fable 5 26a59c1d6a Add release-prep: vfmt 0.2.0, LICENSE, CHANGELOG, release tooling
Version bumped to 0.2.0 (workspace-inherited, one line + lockfiles;
both binaries report it). Root MIT LICENSE plus the editors/vscode
copy that lets vsce package run without --skip-license, closing the
editor-packaging handshake. CHANGELOG.md is a user-facing first-
release document: six area paragraphs linking the feature READMEs,
stating the current corpus truth (476/820 formattable, zero
verification errors, zero crashes). tools/release.sh builds
checksummed host binaries + the sideloadable .vsix into gitignored
dist/ (aborts before deleting prior artifacts on failure -- proven
live); tools/RELEASING.md is the checklist, with marketplace/OpenVSX
commands demoted to an explicitly optional appendix per the owner:
publishing is fully deferred, sideloading via code
--install-extension is the supported path, publisher stays
REPLACE-ME.

Dev: Opus agent (mid-flight scope trim handled cleanly); QA: Sonnet
agent (artifacts, real sideload cycle, all 26 changelog links);
review in docs/features/release-prep/README.md.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-19 12:39:10 -07:00
lucioandClaude Fable 5 832bf4afc6 Add editor-packaging and vfmt-core-lift (round 12: TODO §6 closes)
editor-packaging: a minimal VS Code extension (41-line plain JS on
vscode-languageclient =9.0.1, one setting vfmt.serverPath, languages
verilog/systemverilog) with a zero-dependency smoke.js that validates
the extension's exact spawn contract against the real binary, plus
Neovim/Vim/coc setup docs (including the load-bearing
vim.filetype.add — Vim maps *.v by content heuristic and *.vh not at
all). Everything headless-validatable was validated: the .vsix
builds, smoke passes with negative controls, npm ci reproduces.

vfmt-core-lift: config.rs and walk.rs moved to a new std-only
vfmt_core crate as byte-identical 100% renames (CLI suite untouched,
corpus TSV md5 equal from HEAD and lifted builds). The LSP server
now discovers vfmt.toml per document with precedence config > client
tabSize > built-in default (an editor default is not a deliberate
override), warns once per document change on a broken config while
formatting with defaults, and scans the workspace with the lifted
gitignore-aware walk. QA drove every claim live over stdio.

With these, every TODO §6 item is delivered: spans, tolerant
parsing, define table, single-file semantics, workspace index, the
server, and both editors. Lead trued up the caveats this round made
stale across five documents.

Dev: 2 Opus agents; QA: 2 Sonnet agents; reviews in
docs/features/{editor-packaging,vfmt-core-lift}/README.md.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-19 10:08:14 -07:00