4 Commits
Author SHA1 Message Date
lucioandClaude Fable 5 03a4958294 Inline instantiation round 2: the space is the commitment, and every indexed module answers
Two owner rulings from live use. The ghost now fires only after
'name<space>' — aes alone may still be growing into aes_dft, so the
typed space is what says the name is finished; an Ident ending at the
cursor offers nothing at all. And a module declared in more than one
file no longer declines: completion::nearest_definition picks the copy
sharing the most leading path components with the asking buffer (a
top_earlgrey buffer gets top_earlgrey's ast_dft), then the shallowest,
then the lexicographically smallest — the depth term is QA's catch,
fixed at review, so a direct sibling beats a deeper subdirectory copy
that ties on the prefix. vlog_refactor::module_definition keeps its
ambiguity refusal for its own callers.

The refusal residue is now the enumerable inline::NoGhost, and QA's
sweep proves the ruling: 1131/1131 opentitan module names ghost, zero
declines (199 multiply-declared, tb 61 ways), ast_dft and io_osc
verified from both tops over the wire, 0.05-0.08 ms per non-matching
keystroke.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-30 17:15:42 -07:00
lucioandClaude Fable 5 cadb4319e4 Inline instantiation: the popup names the module, the ghost writes the rest
ci / checks (push) Successful in 45s
ci / corpus (push) Successful in 19s
Two levels, sized for opentitan. Tier 0 of the completion popup stops
planning skeletons (up to 64 file reads + header parses per keystroke)
and offers module names alone; once the identifier at the cursor exactly
matches an indexed module, textDocument/inlineCompletion ghosts the full
instantiation — every parameter, every port, each a tabstop, in-scope
signals auto-connected — planned once through the existing header-slice
path and the FileView cache. Candidates::has_module is the per-keystroke
probe: a case-sensitive binary search whose str-order premise is pinned.
lucisv.inlineInstantiation (default on) gates it, independent of
inlineTemplates.

Measured on opentitan: non-matching keystroke 0.10-0.17 ms warm, ghost
0.6-1.1 ms for aes (14 params/16 ports), 2.5 ms cold for the
112-parameter top_earlgrey; popup module tier reads no files at all.

Lead corrections at merge: four doc references to a lucisv/instantiate
command that never existed, replaced by the honest gap (topo 2.9-19: no
skeleton path for clients without inlineCompletion); extension and nvim
README docs delivered.

docs/features/inline-instantiation/README.md; TODO.md section 12.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-08-30 14:17:16 -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 78ba0b8ba6 Refactoring M4: module hinting — instantiation completion + signature help
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]>
2026-08-24 07:21:32 -07:00