diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2023-07-24 17:03:34 +0200 |
|---|---|---|
| committer | DanielGavin <danielgavin5@hotmail.com> | 2023-07-24 17:03:34 +0200 |
| commit | 7343fc4bdf4ffd616c1818bb2dfefa04d1242167 (patch) | |
| tree | ad5c8ef1d68c9511900802ced54d878ea404fa4f /src/server/completion.odin | |
| parent | cbc578cc9bfc013866e726438296798ab6407d39 (diff) | |
Save the client name for specific client handling
Diffstat (limited to 'src/server/completion.odin')
| -rw-r--r-- | src/server/completion.odin | 24 |
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 + } + } } } |