diff --git a/lsp/src/main/java/workspace/plugins/LSPPlugin.java b/lsp/src/main/java/workspace/plugins/LSPPlugin.java index 0bbd47649..3ce83e2b4 100644 --- a/lsp/src/main/java/workspace/plugins/LSPPlugin.java +++ b/lsp/src/main/java/workspace/plugins/LSPPlugin.java @@ -1292,7 +1292,19 @@ public RPCMessageList afterChangeWatchedFiles(RPCRequest request, int actionCode { if (actionCode == RELOAD_AND_CHECK) { - loadAllProjectFiles(); + // We may have effectively deleted files by editing VDMIGNORE + List oldIgnores = vdmignore; + + loadAllProjectFiles(); // Re-reads ignore file + + // Check for newly ignored files and add as deletions (processed below) + for (File file: vdmignore) + { + if (!oldIgnores.contains(file)) + { + deleted.add(file); + } + } } RPCMessageList results = null;