aboutsummaryrefslogtreecommitdiff
path: root/src/server/completion.odin
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/completion.odin')
-rw-r--r--src/server/completion.odin24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/server/completion.odin b/src/server/completion.odin
index e4604b7..f5f32ac 100644
--- a/src/server/completion.odin
+++ b/src/server/completion.odin
@@ -1830,16 +1830,24 @@ format_to_label_details :: proc(list: ^CompletionList) {
case .Keyword:
item.detail = "keyword"
}
-
- // hack for sublime text's issue
+
+ // 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
- }
+ if common.config.client_name == "Sublime Text LSP" {
+ 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
+ }
+ }
}
}