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

@@ -1,5 +1,6 @@
#pragma once
#include <vls/features/FileOperations.hpp>
#include <vls/semantic/StockCompiler.hpp>
#include <functional>
@@ -16,6 +17,9 @@ class EditorDiagnostics {
WorkspaceSession &, const Documents::DocumentStore &, Send);
~EditorDiagnostics();
void set_version_support(bool);
// Filesystem changes from workspace file-operation notifications. Paths
// that changed or disappeared invalidate every dependent analysis context.
void files_changed(std::span<const features::file_operations::Change>);
void begin_update();
void finish_update(bool workspace_changed = false);
void stop();