diff --git a/src/server/check.odin b/src/server/check.odin index 1280b765..fc5ef920 100644 --- a/src/server/check.odin +++ b/src/server/check.odin @@ -108,6 +108,8 @@ check :: proc(paths: []string, uri: common.Uri, config: ^common.Config) { errors := make(map[string][dynamic]Diagnostic, 0, context.temp_allocator) + clear_diagnostics(.Check) + for path in paths { command: string @@ -138,7 +140,6 @@ check :: proc(paths: []string, uri: common.Uri, config: ^common.Config) { return } - clear_diagnostics(.Check) if len(buffer) == 0 { continue diff --git a/src/server/documents.odin b/src/server/documents.odin index b08f223d..b9f0b63b 100644 --- a/src/server/documents.odin +++ b/src/server/documents.odin @@ -325,8 +325,6 @@ document_refresh :: proc(document: ^Document, config: ^common.Config, writer: ^W uri := common.create_uri(path, context.temp_allocator) remove_diagnostics(.Syntax, uri.uri) - remove_diagnostics(.Check, uri.uri) - check_unused_imports(document, config) if writer != nil && !config.disable_parser_errors {