Is your feature request about something that is currently impossible or hard to do? Please describe the problem.
When defining custom :complete-functions, they can return :h complete-items to customize how the items are rendered in the completion popup. Some of the supported fields are kind and kind_hlgroup, which are very useful to provide semantic context on the type of the item with a concise symbol.
The kind symbol is rendered after the word / abbr, and this cannot be changed.
Describe the solution you'd like
It would be great if we could configure the kind symbol to be rendered before the word / abbr.
This could be achieved either with a specific option on the returned complete-items (e.g., kind_pos = 'begin'|'end'), or a more generic option (e.g., order = ['kind', 'abbr', 'menu']), although the latter might require more effort to get alignment and trimming right.
Describe alternatives you've considered
I tried building abbr as kind .. ' ' .. word, but this doesn't work because there is not way of applying the kind_hlgroup to a substring of abbr (which is highlighted by abbr_hlgroup).
Additional context
When typing, I focus on the cursor position, so having the semantic kind symbol right next to the cursor is helpful, rather than having it possibly half a screen away (depending on the max length of the completion items / completion popup).
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()