Skip to content

Commit

Permalink
feat(editors/vscode): clear diagnostics on file deletion (#6326)
Browse files Browse the repository at this point in the history
closes #6325
  • Loading branch information
shulaoda authored Oct 7, 2024
1 parent 03bc041 commit f272137
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions editors/vscode/client/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,13 @@ export async function activate(context: ExtensionContext) {
serverOptions,
clientOptions,
);

workspace.onDidDeleteFiles((event) => {
event.files.forEach((fileUri) => {
client.diagnostics?.delete(fileUri);
});
});

workspace.onDidChangeConfiguration((e) => {
let isAffected = e.affectsConfiguration('oxc_language_server');
if (!isAffected) {
Expand Down

0 comments on commit f272137

Please sign in to comment.