minad / corfu

:desert_island: corfu.el - COmpletion in Region FUnction
GNU General Public License v3.0
1.15k stars 43 forks source link

corfu-popupinfo cuts of documentation in lsp-mode #255

Closed stevemolitor closed 1 year ago

stevemolitor commented 1 year ago

The new corfu-popupinfo extension cuts off documentation in lsp-mode (at least).

In the add-corfu-doc branch, commit 718e9c4, it looks like this:

Note that in the first example the documentation gets cut off - "Subscribes component ". In the older code in the second example it does not get cut off - "Subscribes component to updates of the given state."

I did not see documentation get cut off in emacs-lisp mode - everything looked good there. But I do see it get cut off in lsp-mode. I have not tried other modes.

Also note that the formatting of the text is better in the older commit (although the placement on the right hand side is nicer in the new code.)

I am using ns emacs 29.0.50.

minad commented 1 year ago

~I believe this should be fixed in Corfu 0.33. Please check.~

I was wrong. I think the problem was that due to the wrapping, the size computation was wrong. It should be fixed now in the newest commit. See also corfu-popupinfo-direction, which allows you to customize the preferred direction (vertical or horizontal).

Eason0210 commented 1 year ago

Now the issue has been fixed with Eglot (Emacs 29.0.50). Thanks @minad

stevemolitor commented 1 year ago

It is inconsistent when I set corfu-popupinfo-direction to horizontal. Sometimes I see this (bad):

Sometimes as I complete or start completion over it works (good):

So far at least it does seem to work consistently when I set corfu-popupinfo-direction to vertical:

I am using commit b9727c5.

minad commented 1 year ago

@stevemolitor The bad look should only occur if the popup doesn't fit. But maybe the size computation of the text is also not correct. I will fix this in case I observe it again in my