diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2025-10-22 00:38:35 +0200 |
|---|---|---|
| committer | DanielGavin <danielgavin5@hotmail.com> | 2025-10-22 00:38:35 +0200 |
| commit | 6a6045e1f98f7a822f240b63518402f8d4d6257b (patch) | |
| tree | a0a01f1e730cff46d7390a36cf0105ff3e39a995 /src/server/check.odin | |
| parent | 7d293c322ef85e4b60c943c220f1a6dd45895672 (diff) | |
Use get_case_sensitive_path for the uri in diagnostic. It matters for Zed that they are case correct.
Diffstat (limited to 'src/server/check.odin')
| -rw-r--r-- | src/server/check.odin | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/server/check.odin b/src/server/check.odin index b4bc674..e4185c7 100644 --- a/src/server/check.odin +++ b/src/server/check.odin @@ -72,7 +72,13 @@ check_unused_imports :: proc(document: ^Document, config: ^common.Config) { unused_imports := find_unused_imports(document, context.temp_allocator) - uri := common.create_uri(document.uri.path, context.temp_allocator) + path := document.uri.path + + when ODIN_OS == .Windows { + path = common.get_case_sensitive_path(path, context.temp_allocator) + } + + uri := common.create_uri(path, context.temp_allocator) remove_diagnostics(.Unused, uri.uri) @@ -174,7 +180,13 @@ check :: proc(paths: []string, uri: common.Uri, config: ^common.Config) { continue } - uri := common.create_uri(error.pos.file, context.temp_allocator) + path := error.pos.file + + when ODIN_OS == .Windows { + path = common.get_case_sensitive_path(path, context.temp_allocator) + } + + uri := common.create_uri(path, context.temp_allocator) add_diagnostics( .Check, |