Closed erikarvstedt closed 2 years ago
Let me revert this. See #710.
OK I see - it's actually auto-hiding during post-command hook evaluation, but since lsp-ui-doc
calls lsp-ui-doc--callback
synchronously it's effectively happening immediately. Whereas lsp-ui-doc--mouse-display
, and lsp-ui-doc--make-request
(as used by both cursor and glance) all end up calling lsp-ui-doc--callback
via an asynchronous request, which means the hiding happens on the next command. (Still a bug though, since when you call lsp-ui-doc-show
it shouldn't auto-hide at all)
The code seems a bit of a mess / inconsistent to me. There seems no good reason why lsp-ui-doc-show
should be synchronous while the others are asynchronous, and lsp-ui-doc-glance
should be treated the same as lsp-ui-doc-show
but with the addition of auto-hide. I'll make another PR.
Opened #711
Both lsp-ui-doc-show
and lsp-ui-doc-glance
work fine with it for me.
Since commit
bc05895033b80b79dce179e56b04289ff29abef4
(#696),lsp-ui-doc-show
doesn't show a doc popup anymore, only mode-line documentation is shown.I've reproduced this with a minimal Emacs config:
bd31dc3e9c96b11078a58ad2aa1dcac69c5283af
bc05895033b80b79dce179e56b04289ff29abef4