aboutsummaryrefslogtreecommitdiff
path: root/src/server/completion.odin
diff options
context:
space:
mode:
authorryuukk <44361234+ryuukk@users.noreply.github.com>2023-07-24 07:33:05 +0200
committerGitHub <noreply@github.com>2023-07-24 07:33:05 +0200
commitc2e65be90a3a4d8ea3ac30d63b714ba78f8fe594 (patch)
tree9842ce76e28335c14a241bf9771a7d159d23bc08 /src/server/completion.odin
parent9f1819a86cf4fe8df8b88eca11a289566db53864 (diff)
hack for sublime text bug
Diffstat (limited to 'src/server/completion.odin')
-rw-r--r--src/server/completion.odin12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/server/completion.odin b/src/server/completion.odin
index 806f334..092a406 100644
--- a/src/server/completion.odin
+++ b/src/server/completion.odin
@@ -1815,7 +1815,17 @@ format_to_label_details :: proc(list: ^CompletionList) {
item.detail = item.label
case .Keyword:
item.detail = "keyword"
- }
+ }
+
+ // hack for sublime text's issue
+ // remove when this issue is fixed: https://github.com/sublimehq/sublime_text/issues/6033
+ // or if this PR gets merged: https://github.com/sublimelsp/LSP/pull/2293
+ dt:= &item.labelDetails.? or_else nil
+ if dt == nil do continue
+ if strings.contains(dt.detail, "..") || strings.contains(dt.detail, "#") {
+ s, _ := strings.replace_all(dt.detail, "..", "ꓸꓸ", allocator = context.temp_allocator)
+ dt.detail = s
+ }
}
}