aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/check.odin16
-rw-r--r--src/server/documents.odin8
2 files changed, 21 insertions, 3 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,
diff --git a/src/server/documents.odin b/src/server/documents.odin
index a042ee0..ed1fb52 100644
--- a/src/server/documents.odin
+++ b/src/server/documents.odin
@@ -318,7 +318,13 @@ document_refresh :: proc(document: ^Document, config: ^common.Config, writer: ^W
return .None
}
- 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(.Syntax, uri.uri)
remove_diagnostics(.Check, uri.uri)