Handle workspace file-operation notifications

The server advertises didCreate/didRename/didDelete file operations
with file-scheme filters. A bounded core converts notifications into
canonical filesystem changes (rename as old-gone/new-present, non-file
URIs ignored, invalid URIs rejected) with registered tests, and
EditorDiagnostics invalidates every dependent index context for
changed or removed paths before re-queueing open documents. A real
stdio session observed the index become incomplete after a deleted
header, and a malformed notification left the server answering.
This commit is contained in:
faumaray committed 2026-12-05 16:03:06 +03:00
1 parent 130cb57a7f
commit 158125ace5
12 files changed
+248 -12

No files matched your search

+18
View File
@@ -79,6 +79,24 @@ 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 workspace file operations
The server advertises `workspace.fileOperations` (`didCreate`, `didRename`,
`didDelete`) with file-scheme filters. `include/vls/features/FileOperations.hpp`
converts notifications into canonical filesystem changes (rename yields the old
path gone and the new path present; non-file URIs are counted as ignored;
invalid URIs reject the notification) with registered `vls_feature_tests`
cases. `EditorDiagnostics::files_changed` invalidates every dependent index
context for changed or removed paths (clearing an overlay for removed files) and
the editor re-queues open documents.
A real stdio session with a temporary workspace whose `main.cpp` includes
`extra.hpp`: before deletion `ready` with `index {'complete': True, 'records': 1}`;
after deleting the header and sending `workspace/didDeleteFiles` the analysis
re-ran to `partial` with `index {'complete': False, 'records': 0}`, and a
malformed rename notification left the server answering. All 18 native suites
and all 18 CMake tests passed.
## December 5 inlay hints from occurrence signatures
`include/vls/features/InlayHints.hpp` finds the top-level argument starts of a