aboutsummaryrefslogtreecommitdiff
path: root/src/server/completion.odin
diff options
context:
space:
mode:
authorDanielGavin <danielgavin5@hotmail.com>2023-07-24 17:03:34 +0200
committerDanielGavin <danielgavin5@hotmail.com>2023-07-24 17:03:34 +0200
commit7343fc4bdf4ffd616c1818bb2dfefa04d1242167 (patch)
treead5c8ef1d68c9511900802ced54d878ea404fa4f /src/server/completion.odin
parentcbc578cc9bfc013866e726438296798ab6407d39 (diff)
Save the client name for specific client handling
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
+ }
+ }
}
}