diff options
| author | Marcus Caisey <marcus@teckna.com> | 2026-05-13 16:02:15 +0100 |
|---|---|---|
| committer | Marcus Caisey <marcus@teckna.com> | 2026-05-21 18:15:14 +0100 |
| commit | ce7df01391be8df721c5de1c57d4b254a7792524 (patch) | |
| tree | 95bf6ee8fa55c62eb0c3416672b0723c1c51d627 /runtime/syntax/cpp.vim | |
| parent | 10a53e763723fba0f53b1dbe793ba709adeab4c6 (diff) | |
| download | rneovim-ce7df01391be8df721c5de1c57d4b254a7792524.tar.gz rneovim-ce7df01391be8df721c5de1c57d4b254a7792524.tar.bz2 rneovim-ce7df01391be8df721c5de1c57d4b254a7792524.zip | |
fix(lsp): resolve CompletionItem if resolvable fields aren't populated
Problem:
If `CompletionItem.documentation` is populated but `detail` is not, then
`detail` is not resolved.
Solution:
Ensure that we resolve a `CompletionItem` if either `detail` or
`documentation` are not populated.
I've also removed `detail` from the popup menu since otherwise it will
be populated in both the popup menu and the info popup after the
`CompletionItem` has been resolved. I think the info popup is the best
place for it anyway as when there is a completion item with a long popup
menu entry (when `detail` is a medium/long function signature for
instance), the whole popup menu gets widened and this steals horizontal
space that could be used to display the `documentation`. Now with
`detail` and `documentation` in the info popup, they share the same
horizontal space. This also aligns with how VSCode, nvim-cmp, blink.cmp,
and mini.nvim display `detail`.
Diffstat (limited to 'runtime/syntax/cpp.vim')
0 files changed, 0 insertions, 0 deletions