Skip to content

Commit

Permalink
Move removing dependencies to inside settings check (#229)
Browse files Browse the repository at this point in the history
When changing dependent files, they are being removed as dependencies when the file is being closed. This is causing problem associated with them to remain until VS Code is closed.
  • Loading branch information
jc43081 authored Nov 25, 2024
1 parent 019509e commit eaee96f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,9 @@ function setupDocumentListener(): void {
documents.onDidClose((event) => {
resolveSettings(event.document).then((settings) => {
const uri = event.document.uri;
documentSettings.delete(uri);
seenDependencies.delete(uri);
if (settings.validate) {
documentSettings.delete(uri);
seenDependencies.delete(uri);
// Clear any diagnostics associated with the document that closed.
connection.sendDiagnostics({ uri: uri, diagnostics: [] });
}
Expand Down

0 comments on commit eaee96f

Please sign in to comment.