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
@@ -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