Serve document symbols and highlights over LSP
SymbolIndex::find_by_path exposes one document's records with the same overlay shadowing and coverage as find. EditorDiagnostics maps them to textDocument/documentSymbol, and a bounded same-file highlight core (vls/features/DocumentSymbols.hpp) backs textDocument/documentHighlight from verified occurrence facts with the ambiguous-binding rule. Both are advertised and exercised over a real stdio session with the stock observer. Record the LSP parity matrix.
This commit is contained in:
1 parent
da8003f6d4
commit
8ca3dcbf74
16 files changed
+366
-8
No files matched your search
@@ -0,0 +1,43 @@
|
||||
# LSP parity matrix
|
||||
|
||||
Target (user direction): clangd feature parity plus every LSP capability that
|
||||
applies to a C++ language server. Status is evidence-based; `PARTIAL` names the
|
||||
missing part.
|
||||
|
||||
## Implemented and verified
|
||||
|
||||
| Capability | Evidence |
|
||||
| --- | --- |
|
||||
| initialize / initialized / shutdown / exit | native transcripts and registered tests |
|
||||
| textDocument sync (full + incremental, UTF-8/UTF-16) | document suite, real stdio corpora |
|
||||
| publishDiagnostics (stock GCC, in-process default profile) | diagnostic suite, stdio corpus |
|
||||
| textDocument/hover, definition | stock occurrence corpus |
|
||||
| textDocument/references, prepareRename, rename | navigation suite, stock corpus refusals |
|
||||
| textDocument/completion (+ completionItem/resolve) | `vls_feature_tests`, real stdio session |
|
||||
| textDocument/signatureHelp | `vls_feature_tests`, real stdio session |
|
||||
| textDocument/documentSymbol | `vls_index_tests` path query, real stdio session |
|
||||
| textDocument/documentHighlight | `vls_feature_tests`, real stdio session |
|
||||
| workspace/symbol | stock occurrence corpus |
|
||||
| voidLanguageServer/analysisStatus, providerStatus | stdio corpora |
|
||||
| Debug adapter (DAP) separately through `vls-dap` | `vls_live_tests`, `vls_dap_tests` |
|
||||
|
||||
## Open
|
||||
|
||||
| Capability | Notes |
|
||||
| --- | --- |
|
||||
| Compiler-native completion with visibility proof | index-backed completion is explicitly incomplete |
|
||||
| Overload-set signature help | only the selected occurrence's signature is available |
|
||||
| textDocument/selectionRange, foldingRange | straightforward next slices |
|
||||
| textDocument/codeAction, formatting | compiler-backed; needs a plan |
|
||||
| textDocument/semanticTokens, inlayHint | larger
|
||||
| textDocument/codeLens, executeCommand | command surface not designed |
|
||||
| callHierarchy / typeHierarchy | needs compiler call/type relationships |
|
||||
| workspace edits and file operations | client-side application is also open |
|
||||
| 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 |
|
||||
|
||||
## Next slices
|
||||
|
||||
1. selectionRange and foldingRange from document snapshots.
|
||||
2. codeAction quick fixes from published diagnostics.
|
||||
3. Semantic tokens from stock occurrences.
|
||||
@@ -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. 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. 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
|
||||
|
||||
@@ -66,6 +66,7 @@ The original writer released the foundation files. Current ownership follows.
|
||||
| T-PLAN-EDITORS-022 | COMPLETE | Root | Verified Neovim 0.12.6, nvim-dap cfa2d58, VS Code 1.147.0, Node 24.22.3. Two ownership-ready contracts: [T-CLIENT-NEOVIM-023](tasks/T-CLIENT-NEOVIM-023.md) and [T-CLIENT-VSCODE-022](tasks/T-CLIENT-VSCODE-022.md). |
|
||||
| T-CLIENT-NEOVIM-023 | IMPLEMENTED_TESTED | Root | `clients/neovim/` and `tests/native/NeovimClient.lua` passed with the installed server, adapter and nvim-dap. VS Code client remains. |
|
||||
| T-CLIENT-VSCODE-022 | IMPLEMENTED_TESTED | Root | `clients/vscode/` and `tests/native/VscodeClient.py` passed in a disposable extension host with VS Code 1.147.0. |
|
||||
| T-LSP-PARITY-014 | PARTIAL | Root | Parity program (user direction: clangd parity plus the full applicable LSP surface). This slice: `textDocument/documentSymbol` from `SymbolIndex::find_by_path`, `textDocument/documentHighlight` from registered `vls_feature_tests` core, both advertised and exercised over stdio. Open: selectionRange, foldingRange, code actions, formatting, semantic tokens, inlay hints, call/type hierarchy, code lens, executeCommand, workspace edits/file operations, compiler-native completion, overload signature help, client-side multi-file rename application. [Matrix](LSP-PARITY.md). |
|
||||
|
||||
Per D-027 the generic runtime uses an explicit GPT-6.2 model and Max for each
|
||||
assignment. The suggested Sol implementation assignment follows planner/preflight.
|
||||
|
||||
@@ -79,6 +79,26 @@ 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 document symbols and document highlights
|
||||
|
||||
`SymbolIndex::find_by_path` returns the records whose use location is in one
|
||||
path with the same overlay shadowing, deduplication, coverage and truncation as
|
||||
`find` (registered `vls_index_tests` case
|
||||
`finds_records_by_path_with_overlay_shadowing`). `EditorDiagnostics` maps it to
|
||||
`textDocument/documentSymbol` and advertises `documentSymbolProvider`.
|
||||
`include/vls/features/DocumentSymbols.hpp` adds a bounded, same-file highlight
|
||||
core (`highlights`), used by `textDocument/documentHighlight` from the verified
|
||||
occurrence facts with the ambiguous-binding rule; the server advertises
|
||||
`documentHighlightProvider`.
|
||||
|
||||
A real stdio session with the stock observer on `DocumentSnapshot.cpp`:
|
||||
```
|
||||
documentSymbol: 1 first: ['fnv1a64']
|
||||
documentHighlight: [(18, 33, 1)]
|
||||
```
|
||||
All 18 native suites and all 18 CMake tests passed. The outline currently
|
||||
contains only recorded uses (the observer reports calls), not declarations.
|
||||
|
||||
## December 5 signature help from stock occurrence facts
|
||||
|
||||
`include/vls/features/SignatureHelp.hpp` and
|
||||
|
||||
Reference in new issue
Block a user