Consume a compiler-agnostic completion index

Under D-032, completion can now merge candidates from a documented,
versioned index file produced by any external tool. The bounded core
parses and selects the innermost covering scope, the server puts its
items ahead of index-backed ones and takes isIncomplete from the
scope's complete flag, and registered feature tests cover parsing,
selection and bounds. A real stdio session returned the provided
items first with isIncomplete false inside the scope and true outside.
This commit is contained in:
faumaray committed 2026-12-06 02:10:16 +03:00
1 parent 236c3c5718
commit 4a029152e9
13 files changed
+336 -11

No files matched your search

+1 -1
View File
@@ -35,7 +35,7 @@ missing part. Updated December 5, 2026 after semantic tokens and inlay hints.
| Capability | Notes |
| --- | --- |
| Compiler-native completion with visibility proof | not pursued through a custom compiler (D-032); generic completion remains index-backed and incomplete |
| Compiler-native completion with visibility proof | provided through the compiler-agnostic `--completion-index` interface (D-032); visibility proof is the producer's claim. The built-in index-backed completion remains incomplete without it. |
| Overload-set signature help | observed overloads are listed with the compiler-selected one first; visibility and overload resolution are not proven |
| 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. |
+1 -1
View File
@@ -62,7 +62,7 @@ suite covers stepping, inspection per generation, continue, cancel, refusal
without a stop, malformed output and the deadline, and a real DAP transcript
test drives the adapter end to end.
Completion is now served: `textDocument/completion` is advertised and answered from the symbol index through `EditorDiagnostics::completion`, with a bounded ranking core in `include/vls/features/` and registered `vls_feature_tests`. Results are explicitly incomplete because the index does not prove visibility; compiler-native completion, deferred detail resolution and signature help remain open.
A compiler-agnostic completion index (`--completion-index`) can supply proven candidates merged ahead of index-backed ones. Completion is now served: `textDocument/completion` is advertised and answered from the symbol index through `EditorDiagnostics::completion`, with a bounded ranking core in `include/vls/features/` and registered `vls_feature_tests`. Results are explicitly incomplete because the index does not prove visibility; compiler-native completion, deferred detail resolution and signature help remain open.
Index-backed rename coverage is now merged into the navigation fact set (`vls/features/IndexNavigation.hpp`): persisted index contexts and records join the set with the index's completeness, existing compiler-derived facts win, and records without a known current content identity stay non-editable so rename refuses them. Multi-file rename can therefore be ready from real index data when a transactional client is present, proven by registered `vls_feature_tests` cases.
+19
View File
@@ -61,6 +61,25 @@ start coordinate only, so ranges are zero-width until an end is available.
LSP adapters and index/rename/debugging integration remain open. `vbs test`
passed all 17 native suites; CMake passed the reflection and trace suites.
## December 6 compiler-agnostic completion source
Per D-032, completion can now consume a documented, compiler-agnostic index
(`--completion-index PATH`) produced by any external tool:
`{"schema":1,"scopes":[{"path","startLine","startCharacter","endLine",
"endCharacter","complete","items":[{"label","kind?","detail?","insertText?"}]}]}`
with the producer's visibility claim carried through unchanged. The bounded
core (`vls/features/CompletionSource.hpp`) parses and selects the innermost
covering scope; the server merges its candidates ahead of index-backed ones and
sets `isIncomplete` from the scope's `complete` flag. Registered
`vls_feature_tests` grew to 115 cases.
Real stdio session:
```
inside scope: isIncomplete = False items = ['alpha', 'beta', 'main']
outside scope: isIncomplete = True
```
All 18 native suites and all 18 CMake tests passed.
## December 6 locality ranking in completion
Completion candidates now carry whether they are declared in the requesting