Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long text in lsp-ui-doc boxes can hang emacs and is unreadable in the minibuffer with eldoc-enable-hover #692

Open
fhars opened this issue Apr 3, 2022 · 1 comment
Labels

Comments

@fhars
Copy link

fhars commented Apr 3, 2022

If the displayed text (like the doc comment for the cortex_m_rt crate) is longer than the box used by lsp-ui-doc, it is impossible to read most of it.

You can hover over a symbol, then the box with the beginnig of the text opens.
You can move the mouse cursor into the box and then scroll down two or three lines, but then nothing more happens.
Once you move the mouse cursor out of the box, you get something like this in the *Messages*buffer:

Args out of range: 503, 503 [45271 times]

If the box was opened because of lsp-ui-doc-show-with-cursor and you then move the mouse pointer into the box and scroll down a line, emacs becomes completely unresponsive.

If you have eldoc-enable-hover activated, the minibuffer will usually display a few lines from somewhere in the middle of such a text, but not always the same.

lsp-ui: 20220311.1634, lsp-mode: 20220401.1003, GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.14) of 2020-03-26, modified by Debian (Ubuntu 20.04)

@fhars fhars changed the title It is impossible to read long text in lsp-ui-doc boxes or the minibuffer with eldoc-enable-hover Long text in lsp-ui-doc boxes can hang emacs and is unreadable in the minibuffer with eldoc-enable-hover Apr 3, 2022
@brotzeit brotzeit added the ui-doc label Jul 5, 2022
@deifactor
Copy link

deifactor commented Apr 9, 2023

In my brief testing, eldoc-box works fine with this sort of thing. I have lsp-eldoc-render-all set to t (you'll probably want to either disable eldoc-mode in lsp-mode buffers or set eldoc-echo-area-use-multiline-p to something small), and an lsp-mode hook to enable `eldoc-box-hover-mode. I was able to scroll a long docstring just fine, even with the doc frame height set to something silly like 30.

So lsp-ui-doc must be doing something eldoc-box isn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants