emacs-lsp / lsp-mode

Emacs client/library for the Language Server Protocol
https://emacs-lsp.github.io/lsp-mode
GNU General Public License v3.0
4.78k stars 884 forks source link

Emacs freezes with `lsp-doc-enable-hover` enabled on large text (ts-ls) #4538

Open morhaham2 opened 1 month ago

morhaham2 commented 1 month ago

Thank you for the bug report

Bug description

Emacs freezes displaying large variable type in echo line.

Steps to reproduce

Hover a symbol which his type is a very large string, like a string variable in typescript when its type is the string value itself.

Expected behavior

Handle large signatures well

Which Language Server did you use?

typesceipt ts-ls

OS

MacOS

Error callstack

No response

Anything else?

No response

yyoncho commented 3 weeks ago

Does it unfreeze when you do C-g? If yes, can you do the following: M-x toggle-debug-on-quit, reproduce the bug, and paste the callstack you see after C-g.