Serve reference code lenses and the showReferences command
A bounded core builds one lens per document position with its proven reference count. EditorDiagnostics counts index records by name and definition and serves textDocument/codeLens; workspace/executeCommand implements vls.showReferences via the navigation binding. Registered feature tests cover titles, arguments, deduplication and bounds. A real stdio session showed the one-reference lens at the fnv1a64 call and resolved it to the source location.
This commit is contained in:
1 parent
ec86a79a1a
commit
0bf5873069
12 files changed
+279
-5
No files matched your search
@@ -21,6 +21,7 @@ missing part. Updated December 5, 2026 after semantic tokens and inlay hints.
|
||||
| textDocument/codeAction (quickfix) | `vls_feature_tests` + `vls_diagnostic_tests`, real stdio session |
|
||||
| textDocument/semanticTokens/full | `vls_feature_tests`, real stdio session |
|
||||
| textDocument/inlayHint (parameter types) | `vls_feature_tests`, real stdio session |
|
||||
| textDocument/codeLens + workspace/executeCommand (`vls.showReferences`) | `vls_feature_tests`, real stdio session |
|
||||
| workspace/symbol | stock occurrence corpus |
|
||||
| workspace fileOperations (didCreate/didRename/didDelete) | `vls_feature_tests`, real stdio session |
|
||||
| workspace/willRenameFiles (include updates) | `vls_feature_tests`, real stdio session |
|
||||
@@ -35,7 +36,6 @@ missing part. Updated December 5, 2026 after semantic tokens and inlay hints.
|
||||
| Overload-set signature help | only the selected occurrence's signature is available |
|
||||
| textDocument/formatting | needs a plan |
|
||||
| callHierarchy / typeHierarchy | prepare, incomingCalls and outgoingCalls are implemented and served; outgoing calls are verified over stdio now that the observer reports full function extents. Type hierarchy is open. |
|
||||
| textDocument/codeLens, executeCommand | command surface not designed |
|
||||
| Client-side application of server-issued workspace edits | rename and code actions return edits the clients apply directly |
|
||||
| Applying multi-file renames through client buffers | plans can be ready; application is client work |
|
||||
| `EditorDiagnostics` reflection LSP wiring | the server has no reflection data source |
|
||||
|
||||
@@ -102,7 +102,7 @@ ingests occurrence facts after each analysis and the server answers
|
||||
Hash.hpp definition through it. Real persistence migrations and cross-file
|
||||
rename coverage remain open.
|
||||
|
||||
Index-backed completion (roadmap 14 first slice) is implemented: `include/vls/features/Completion.hpp`, `src/features/Completion.cpp` and registered `vls_feature_tests` cover prefix extraction, filtering with replacement ranges, label+kind deduplication, deterministic ranking and bounds. `Server.cpp` advertises `completionProvider` and answers `textDocument/completion` from the symbol index through `EditorDiagnostics::completion`; a real stdio session with the stock observer returned `fnv1a64` and `fnv1a64_update` at a real call site. Every result is marked incomplete because the index does not prove visibility. Signature help is now served from the compiler-provided occurrence signature (parameter labels and ranges, active parameter, innermost call selection) and advertised by the server. Document symbols are served from the index by path and document highlights from same-binding occurrence facts; both are advertised and were exercised over stdio with the stock observer. Selection and folding ranges are served from immutable document snapshots with registered bounded cores. Code actions now offer the compiler's own suggested fixes (quickfix) from retained published diagnostics, with SARIF fix decoding bound to the owner snapshot. Semantic tokens encode the proven call occurrences with a bounded one-type legend. Inlay hints project parameter types from the occurrence signature at each argument start. Workspace file-operation notifications invalidate dependent index contexts and re-queue open documents. A will-rename request returns the include updates for open documents. Call hierarchy serves prepare and incoming calls (grouped by enclosing definition or explicitly by file) from the stock call facts. Outgoing calls are served and verified: the stock observer now reports full function extents, so nested calls are attributed to the enclosing definition. Compiler-native completion with visibility proof and deferred detail resolution remain open.
|
||||
Index-backed completion (roadmap 14 first slice) is implemented: `include/vls/features/Completion.hpp`, `src/features/Completion.cpp` and registered `vls_feature_tests` cover prefix extraction, filtering with replacement ranges, label+kind deduplication, deterministic ranking and bounds. `Server.cpp` advertises `completionProvider` and answers `textDocument/completion` from the symbol index through `EditorDiagnostics::completion`; a real stdio session with the stock observer returned `fnv1a64` and `fnv1a64_update` at a real call site. Every result is marked incomplete because the index does not prove visibility. Signature help is now served from the compiler-provided occurrence signature (parameter labels and ranges, active parameter, innermost call selection) and advertised by the server. Document symbols are served from the index by path and document highlights from same-binding occurrence facts; both are advertised and were exercised over stdio with the stock observer. Selection and folding ranges are served from immutable document snapshots with registered bounded cores. Code actions now offer the compiler's own suggested fixes (quickfix) from retained published diagnostics, with SARIF fix decoding bound to the owner snapshot. Semantic tokens encode the proven call occurrences with a bounded one-type legend. Inlay hints project parameter types from the occurrence signature at each argument start. Workspace file-operation notifications invalidate dependent index contexts and re-queue open documents. A will-rename request returns the include updates for open documents. Code lenses show index reference counts and the `vls.showReferences` command resolves them to navigation locations. Call hierarchy serves prepare and incoming calls (grouped by enclosing definition or explicitly by file) from the stock call facts. Outgoing calls are served and verified: the stock observer now reports full function extents, so nested calls are attributed to the enclosing definition. Compiler-native completion with visibility proof and deferred detail resolution remain open.
|
||||
|
||||
The reflection provenance representation (roadmap 12 first slice) is
|
||||
implemented as a bounded library with a registered suite: innermost-first
|
||||
|
||||
@@ -79,6 +79,25 @@ the upgraded snapshot (keeping `snapshot.prev.json`) and rewrites a legacy
|
||||
about 25-30s in a Debug build (it passed VBS at ~27s); the full CMake run then
|
||||
passed 18/18.
|
||||
|
||||
## December 5 code lenses and the reference command
|
||||
|
||||
`include/vls/features/CodeLens.hpp` builds one bounded lens per unique
|
||||
document position, titled with the proven reference count and carrying
|
||||
{path, line, character} arguments. `EditorDiagnostics::code_lenses` counts
|
||||
records by (name, definition location) from the current index generation and
|
||||
serves `textDocument/codeLens`; `workspace/executeCommand` implements
|
||||
`vls.showReferences`, resolving the arguments through the navigation binding
|
||||
and returning the reference locations. Both are advertised and bounded.
|
||||
|
||||
Real stdio session with the stock observer:
|
||||
```
|
||||
codeLens: [({'character': 33, 'line': 18}, '1 reference')]
|
||||
executeCommand: [{"range": {"end": {"character": 40, "line": 18}, "start": {"character": 33, "line": 18}},
|
||||
"uri": "file:///.../DocumentSnapshot.cpp"}]
|
||||
unknown command error: -32602
|
||||
```
|
||||
All 18 native suites and all 18 CMake tests passed.
|
||||
|
||||
## December 5 full function extents from the stock observer
|
||||
|
||||
The stock occurrence observer now reports an optional `extent` inside each
|
||||
|
||||
Reference in new issue
Block a user