mirror of
https://github.com/neovim/neovim.git
synced 2026-05-24 05:40:08 +00:00
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`.