We removed some bogus code for 1.3.x from the core which cleared markers on buffer close. We had to remove that to get to a consistent project build story. Now the producer of markers must ensure to clear them if they re not needed anymore (was the contract always)
If you don't do anything fancy you can use the following snippet:
// Clear diagnostics on close.
documents.onDidClose((event) => {
connection.sendDiagnostics({ uri: event.document.uri, diagnostics: [] });
});
We removed some bogus code for 1.3.x from the core which cleared markers on buffer close. We had to remove that to get to a consistent project build story. Now the producer of markers must ensure to clear them if they re not needed anymore (was the contract always)
If you don't do anything fancy you can use the following snippet: // Clear diagnostics on close. documents.onDidClose((event) => { connection.sendDiagnostics({ uri: event.document.uri, diagnostics: [] }); });