diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/completion.odin | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/server/completion.odin b/src/server/completion.odin index 58be307..054c9c7 100644 --- a/src/server/completion.odin +++ b/src/server/completion.odin @@ -2150,9 +2150,16 @@ format_to_label_details :: proc(list: ^CompletionList) { } case .Variable, .Constant, .Field: type_index := strings.index(item.detail, ":") + type_name := item.detail[type_index + 1:] + + commentIndex := strings.index(type_name, "/") + if commentIndex > 0 { + type_name, _ = strings.substring(type_name, 0, commentIndex) + } + item.labelDetails = CompletionItemLabelDetails { detail = "", - description = item.detail[type_index + 1:], + description = type_name, } case .Struct, .Enum, .Class: type_index := strings.index(item.detail, ":") |