References-nav M7: cross-file references, folding, document highlight

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]>
This commit is contained in:
lucioandClaude Fable 5 committed 2026-08-24 22:53:38 -07:00
1 parent 6036a62784
commit 3c55783e09
12 files changed
+1521 -62

No files matched your search

+4 -3
View File
@@ -141,15 +141,15 @@ 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
- [x] **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
- [x] **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
- [x] **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
@@ -261,6 +261,7 @@ commit — in order:
- [x] M5 completion-core — done, QA clean first pass, reviewed
- [x] M6 completion-templates — done, QA clean first pass, reviewed
- [x] Backlog triage after M6 — LSP-parity gap list added, 2026-08-24
- [x] M7 references-nav — done, QA clean first pass, reviewed
## Work log