From 6036a6278466ab29eb85a02064a5b60d9898d124 Mon Sep 17 00:00:00 2001 From: Guoliang Chen Date: Mon, 24 Aug 2026 21:01:21 -0700 Subject: [PATCH] Backlog triage: nine LSP-parity and plumbing gaps added to the plan Cross-file references (rename can edit what references cannot list), folding from the rainbow's own pair data, document highlight, inlay hints for ordered connections, didChangeWatchedFiles, include/incdir consumption, module hierarchy, semantic lint rules, CLI -f, hover macro expansion. Milestone numbering fixed; triage checked off. Co-Authored-By: Claude Fable 5 --- docs/features/refactor/README.md | 64 ++++++++++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 3 deletions(-) diff --git a/docs/features/refactor/README.md b/docs/features/refactor/README.md index 9150455..bd39225 100644 --- a/docs/features/refactor/README.md +++ b/docs/features/refactor/README.md @@ -135,6 +135,53 @@ the work is reviewed**. Owner-priority items first (2026-08-24). - [ ] **Rename module together with its file** (`module-filename` rule agreement; needs LSP `workspace/willRenameFiles` plumbing) +### LSP-parity and plumbing gaps (lead triage, 2026-08-24 night) + +Found by auditing the shipped capability set against the LSP end goal +(Pylance/ruff parity), the code's own "not shipped" notes, and what M1–M6 +built but nothing consumes yet. Ordered by value ÷ cost: + +- [ ] **Cross-file find-all-references** — `textDocument/references` is + still in-file only (nav.rs:50; vfmt-server README names it "not done"), + yet M2's rename already collects cross-file reference sets in + `vlog_refactor`. Rename can change what references can't even list. + Reuse M2's collection for the references answer — mostly wiring. +- [ ] **Folding ranges** — `pairs.rs` already computes every + begin/end/module/generate range for the rainbow; `foldingRange` is the + same data on a standard capability. Cheapest win on this list. +- [ ] **Document highlight** — cursor on a symbol highlights its other + occurrences; one `references_of` call, no new analysis. +- [ ] **Inlay hints for ordered connections** — `u (clk, rst_n, data)` + shows `.clk:`/`.rst_n:` ghost labels from the instantiated module's + definition (same index facts as M4); parameter names on ordered + `#(...)` overrides too. High everyday value in RTL review. +- [ ] **External file-change awareness** — the index rebuilds on save and + didOpen only; a `git pull`, an external edit, or editing the `.f` + filelist itself goes unnoticed until the next save. Register + `workspace/didChangeWatchedFiles` (sources + the filelist) and reindex. +- [ ] **`` `include`` navigation and `+incdir+` consumption** — M1 records + incdirs and nothing uses them; `` `include "x.svh" `` is not clickable + and the define table stays per-file. Document links (or definition) on + include lines, resolved through the filelist's incdirs, and a + cross-file define-table lookup along the include graph. +- [ ] **Module hierarchy** — "who instantiates X / what does X + instantiate", as LSP callHierarchy (modules as the nodes) or a custom + request the extension renders; the index already knows both directions. +- [ ] **Semantic lint rules** — unused-signal, undriven-net, + multiply-driven: TODO.md §7 calls this the differentiation Verible + cannot do, `vlog_semantic` has existed for rounds, and no semantic rule + ships yet. +- [ ] **CLI `-f` filelist flag** — the vfmt.toml `filelist` key and the + server consume M1's parser; `vfmt -f files.f` (format/lint exactly the + project's files) still does not exist. +- [ ] **Single-step macro expansion on hover** — the define-table README + promised it "later"; hover shows the body but expands nothing. + +Already tracked elsewhere, deliberately not duplicated here: the +structural refactorings above, external waiver files, fuzzing, error-case +tests, component-level tests, CST losslessness round-trip, `insta`, +corpus-check CI wiring, `--diff-base`, salsa (TODO.md §4–6). + ## Assumptions - The semantic layer is the ground truth for "what references what". @@ -196,8 +243,12 @@ commit — in order: 5. **M5 `completion-core`** — keyword + project-wide identifier completion (token-harvested, comment/string-free), merged with M4's module snippets; version bump to 0.3.0. -5. **Backlog** — the unchecked structural items above, re-planned when the - first four have soaked. +6. **M6 `completion-templates`** — context-gated statement/item snippet + templates; version 0.4.0. (0.4.1 hover-highlighting grammar and 0.4.2 + color-decorator fix landed as owner-reported fixes, not milestones.) +7. **Backlog** — triaged 2026-08-24 night; next milestone is picked from + the LSP-parity list (cross-file references and folding first) unless + the owner reprioritizes. ## Status / TODO @@ -209,10 +260,17 @@ commit — in order: - [x] M4 refactor-instantiate — done, QA clean after one rework round, reviewed - [x] M5 completion-core — done, QA clean first pass, reviewed - [x] M6 completion-templates — done, QA clean first pass, reviewed -- [ ] Backlog triage after M6 +- [x] Backlog triage after M6 — LSP-parity gap list added, 2026-08-24 ## Work log +- **2026-08-24 (lead, backlog triage)**: Audited the feature list against + the shipped capability set. Nine gaps added under "LSP-parity and + plumbing gaps" — the standouts: references is still in-file while rename + is cross-file (M2's machinery makes the fix cheap), folding is free data + the rainbow already computes, inlay hints for ordered connections, file + watching, and the `+incdir+`s M1 records but nothing consumes. Milestone + numbering fixed (duplicate "5."). Nothing shipped was found mis-checked. - **2026-08-24 (lead, end of day)**: M1–M4 all landed the same day, each through the full dev → QA → rework → re-QA → lead-review loop (commits 315bbf2, 33f5819, e338524, 5785fd9). Every milestone needed exactly one