emacs-lsp / lsp-ui

UI integrations for lsp-mode
https://emacs-lsp.github.io/lsp-ui
GNU General Public License v3.0
1.03k stars 141 forks source link

Long lines in `lsp-ui-doc` #646

Open luckysori opened 2 years ago

luckysori commented 2 years ago

As you probably already know, emacs is notoriously bad at rendering long lines. I haven't found a general solution to this problem other than activating so-long mode ad hoc.

When lsp-ui-doc attempts to render documentation with a very long line in it, emacs freezes for a very long time. Is there any way to deal with this problem other than disabling lsp-ui-doc temporarily?

jcs090218 commented 2 years ago

Sorry for the late reply.

What language server are you using? How does a language server want to render a large file in a document window? 😕

luckysori commented 2 years ago

What language server are you using?

This happened to me using the rust-analyzer backend.

How does a language server want to render a large file in a document window?

In this case there was just a very long line in some multi-line documentation string. lsp-ui-doc just tried to render that docstring as usual but it froze as my emacs normally does when it encounters long lines.