diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-08-17 11:04:00 -0400 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-08-17 11:27:56 -0400 |
| commit | bdc164ca3247cd1f5fb25c0efd5bab553cfd1573 (patch) | |
| tree | 7bf58c5ce30b7f39c3445f24cdd537e84dfad042 /src/server/completion.odin | |
| parent | c1a902c51b5d4f3edab63b3044b057ff5cc15321 (diff) | |
Add completion label to detail when using labelDetails
Diffstat (limited to 'src/server/completion.odin')
| -rw-r--r-- | src/server/completion.odin | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/completion.odin b/src/server/completion.odin index 133e61d..9bb2f3b 100644 --- a/src/server/completion.odin +++ b/src/server/completion.odin @@ -279,9 +279,15 @@ convert_completion_results :: proc( details := CompletionItemLabelDetails{} if result.detail != "" { details.description = result.detail + item.detail = result.detail } else { details.detail = get_completion_details(ast_context, result.symbol) details.description = get_completion_description(ast_context, result.symbol) + if details.detail != "" { + item.detail = details.detail + } else if details.description != "" { + item.detail = details.description + } } // hack for sublime text's issue // remove when this issue is fixed: https://github.com/sublimehq/sublime_text/issues/6033 |