diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2025-10-19 17:04:25 +0200 |
|---|---|---|
| committer | DanielGavin <danielgavin5@hotmail.com> | 2025-10-19 17:04:25 +0200 |
| commit | 9f2e58e63db1efbb5a126526a1d2537c98aeb882 (patch) | |
| tree | ddf524b4ba1b5bf901fcf0a47fd5cd7256244e63 /src/server/check.odin | |
| parent | 68a1d21b27c4082af691c50661835df958dce993 (diff) | |
Use the same create_uri function to ensure the uri is consistant when sending diagnostics.uri-fix-diagnostics
Diffstat (limited to 'src/server/check.odin')
| -rw-r--r-- | src/server/check.odin | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/server/check.odin b/src/server/check.odin index b53d7e2..b4bc674 100644 --- a/src/server/check.odin +++ b/src/server/check.odin @@ -72,12 +72,14 @@ check_unused_imports :: proc(document: ^Document, config: ^common.Config) { unused_imports := find_unused_imports(document, context.temp_allocator) - remove_diagnostics(.Unused, document.uri.uri) + uri := common.create_uri(document.uri.path, context.temp_allocator) + + remove_diagnostics(.Unused, uri.uri) for imp in unused_imports { add_diagnostics( .Unused, - document.uri.uri, + uri.uri, Diagnostic { range = common.get_token_range(imp.import_decl, document.ast.src), severity = DiagnosticSeverity.Hint, |