Skip to content

Commit 3de5093

Browse files
committed
fix: clear stale diagnostic before re-collecting
1 parent 5763495 commit 3de5093

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/providers/diagnostics/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ export function registerDiagnosticCollection(mapping: Record<string, Extractor |
2828
const activeDocumentText = useDocumentText(() => activeEditor.value?.document)
2929

3030
async function collectDiagnostics(document: TextDocument, extractor: Extractor) {
31+
diagnosticCollection.delete(document.uri)
32+
3133
const root = extractor.parse(document)
3234
if (!root)
3335
return

0 commit comments

Comments
 (0)