Open BooAA opened 4 years ago
Sorry for the very late response. Do you still see these issues? Or might they have been fixed in the meantime?
[ Note that the way annotations/affixations are handled in Ivy was just improved in commit 12803ed607cebc8bf3f389daa85bf51e003b1014. ]
This is both a feature request and maybe a bug report, if this has no relation with ivy or might be error prone/ad-hoc to be added in ivy, feel free to close this issue directly. There are some completion backend providing additional annotation (like frequency, function prototype, data type, etc), which I found ivy cannot handle some of them properly. For instance,
Case 1 : testing with eglot + clangd, the annotation was displayed under each candidate
If you want to try out yourself, this is how I work in Debian/testing, with Emacs 28
0. Install clangd by
sudo apt install clangd
1. In Emacs, setup eglot by2. Open any C/C++ project, and
M-x eglot
. With the prompt, typeclangd
to choose it as language server (default should be ccls)Case 2 : testing with sly, the annotation is appended after each candidate, without space as delimiter to separate them.
0 Install sly in Emacs by
M-x package-install sly
1 Setup sly by2 Open any Common Lisp file or project, then
M-x sly
, type something andC-M-i
.Above is just 2 cases I use daily, there are also many language servers/completion backend providing additional annotation or metadata through Emacs
completion-at-point
API, so IMHO it might be a good idea for ivy-completion-in-region and ivy-overlay to take care of these information and format them properly.In contrast, I found company with
(setq company-tooltip-align-annotations t)
display the result pretty well, so I think company-capf might be a good reference. (feel free to ignore this if it has no relation with how ivy-completion-in-region collect candidates, since I'm neither a Emacs expert nor an elisp programmer)