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]>
The -f flag (repeatable) feeds M1's filelist parser to format, check,
--check and --diff: listed paths are exact like positional args (never
excluded or gitignored), warnings go to stderr without touching the
frozen exit-code contract, an unreadable filelist is exit 2 with nothing
written, and inputs from every source dedup by lexical absolute path -
which also closes the old vfmt rtl/ rtl/a.sv double-processing. --lines
and stdin reject -f at parse time. vfmt.toml's filelist key stays
server-only, deliberately. QA's exit-code matrix confirmed all eight
cells; its pre-existing torn-write find is filed in TODO §1.
Co-Authored-By: Claude Fable 5 <[email protected]>
The first rules that use vlog_semantic, crossing TODO §7's threshold the
careful way: a read/write/unknown classification layer in vlog_linter
(vlog_semantic untouched - driver semantics is a lint concept), whole-
word mention guards so ifdef arms and macro bodies never produce a false
unused, connections treated as unknown direction, and force/release with
their own driver kind so a test override is neither a second driver nor
the only one. All three default off, decided from data: 55 corpus hits,
zero wrong on reading, but single-file scanning cannot see cross-file
readers. Default vfmt check output is byte-identical to before,
worktree-diffed. ~45ms per 860 files when enabled; three rules cost one.
Co-Authored-By: Claude Fable 5 <[email protected]>
LSP callHierarchy with modules as the nodes: prepare on a declaration or
any instantiation, incoming grouped by instantiating module with every
site as a fromRange, outgoing one call per distinct instantiated module.
The instantiation walk moved out of inlay hints into a shared module
with the owning module threaded through - inlay's 34 untouched tests
prove the factoring changed nothing. A substring prefilter skips 834 of
860 corpus files before parsing (56ms incoming on a real module;
the prefilter-defeating worst case is documented at ~206ms). ifdef arms
both count, disclosed; incoming/outgoing consistency QA-verified.
Co-Authored-By: Claude Fable 5 <[email protected]>
One line scanner feeds three consumers that can never disagree:
documentLink underlines every include path, definition lands on the
resolved file, and hover's define lookup narrows to definitions
reachable through the hovered file's include graph (narrow, never
widen; local defines always win). Resolution is own-directory then the
filelist's +incdir+s in order - M1 recorded them, M10 finally spends
them; angled includes skip the own-directory rung. Resolved paths are
re-spelled the way the index spells them so a case-insensitive
filesystem cannot make hover silently drop a reachable define (QA HIGH,
fixed with a pure lookup that latches to ambiguity on collisions).
Graph build: ~7ms over the 860-file corpus.
Co-Authored-By: Claude Fable 5 <[email protected]>
workspace/didChangeWatchedFiles via dynamic registration (globs for the
four source extensions plus the configured filelist's own path), one
rebuild per notification with the same warning surfacing as save, and
re-registration when vfmt.filelist moves. Registration happens in
Server::new because lsp-server's initialize_finish consumes the
initialized notification - the protocol-suggested handler would be dead
code (verified against the vendored source). Open-buffer overlays
survive rebuilds; malformed and out-of-scope events rebuild nothing.
git pull, external editors and filelist edits now land without a save.
Co-Authored-By: Claude Fable 5 <[email protected]>
textDocument/inlayHint draws ghost portname:/PARAM: labels on positional
connection lists and all-positional #(...) overrides, from the same plan
extraction M4 uses — walked off the parse tree, so nested-call commas
cannot shift positions. Range filtering runs before any definition is
parsed; plans are cached per request (O(distinct modules)); every
uncertainty is silent, including QA's find: an ifdef-carrying port list
unions its arms in the plan, which is right for an editable skeleton and
wrong for a read-only label, so such plans now hint nothing.
Co-Authored-By: Claude Fable 5 <[email protected]>
textDocument/references now answers across files by reusing rename's
occurrence walk (collect_occurrences factored out of collect_edits,
behavior-identical) — a module, port or package member lists every use
the index scope can see; the cross-file gate asks the workspace index,
never re-derives exportedness, and an ambiguous name degrades to the
in-file answer. foldingRange is the fourth consumer of pairs::analyze
(end line stays visible, unmatched openers fold nothing, block comments
included); documentHighlight lights a symbol's in-file occurrences with
the begin/end pair highlighting preserved. M7-M14 queue added to TODO §8.
Co-Authored-By: Claude Fable 5 <[email protected]>
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]>
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]>
vlog_refactor instantiate engine: InstantiationPlan read from the
definition (params with parse-probed defaults, ports with direction/type,
auto-connect by the same scope lookup ports.rs uses), one renderer for the
plain and snippet spellings. Server ships textDocument/completion (module
skeletons as snippets, plain-text fallback when the client lacks snippet
support or the plan carries escaped identifiers) and signatureHelp
(named-by-name, ordered-by-comma-count, wildcard-aware). Corpus property
test: all 454 corpus modules' skeletons re-parse.
Co-Authored-By: Claude Fable 5 <[email protected]>
vlog_refactor ports engine: add_port (ANSI + non-ANSI, named/ordered/.*
sites, .p(p) vs TODO placeholder by real scope lookup), remove_port
(refuses positional connections and live body uses, lists dropped
expressions), propagate_ports, all through a new splice verifier (piece
equality, comments never deleted, no new parse diagnostics, resolution
identity) plus a per-feature shape check. A new port can never silently
land inside an `ifdef arm (nesting-aware refusal, both insertion paths);
macro-argument/define-body occurrences of a removed port warn. Server:
code actions + vfmt.addPort/removePort/propagatePorts executeCommands.
Co-Authored-By: Claude Fable 5 <[email protected]>
New crate vlog_refactor: rename any symbol vlog_semantic resolves, in-file
and cross-file, with whole-edit-or-nothing verification (token identity +
before/after resolution print over every file spelling either name).
End labels rename too via a new vlog_semantic Target::Declaration bound at
declaration time. Server ships prepareRename/rename; refusals are LSP
request errors, define-body/macro-argument/hierarchical-tail occurrences
warn instead of guessing. QA round 1 found two silent HIGHs (third-file
collision, macro-argument silence) — both closed with regression tests.
Co-Authored-By: Claude Fable 5 <[email protected]>
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]>