Fork me on GitHub
#spacemacs
<
2021-12-08
>
Drew Verlee04:12:56

so this really awsesome tooltip will show up about a fn or var, but only if you chill there for like 3 seconds. I don't really have a productive comment here, just that if we could get that down people would love it.

Drew Verlee04:12:09

like i type [clojure.spec.alpha*] where "*'" is the cursor and then magically this how doc shows up about the namespace and im like yea. but it takes so long i probably wont see it before moving on.

Drew Verlee04:12:20

i guess if idont know what i need i can afford to wait around lol

practicalli-johnny13:12:01

Sounds like the Emacs lsp-ui doc popup, which can be configured with these LSP layer variables in Spacemacs I believe its the lsp-ui-doc-delay value to tweak to your requirements (the doc popup really annoys me, so I have a long delay - because at some point I couldnt disable the popup)

lsp-ui-doc-enable nil             ;; disable all doc popups
          lsp-ui-doc-show-with-cursor nil   ;; doc popup for cursor
          lsp-ui-doc-show-with-mouse nil    ;; doc popup for mouse
          lsp-ui-doc-delay 99999            ;; delay in seconds for popup to display
          lsp-ui-doc-include-signature t    ;; include function signature
          ;; lsp-ui-doc-position 'at-point  ;; top bottom at-point
          ;; lsp-ui-doc-alignment 'window      ;; frame window

ericdallo13:12:20

BTW, the lsp-ui-doc-show-with-cursor was changed to be nil by default this week along with the lsp-ui-sideline-show-code-actions, reducing noise on emacs-lsp :) https://github.com/emacs-lsp/lsp-ui/pull/668

bananadance 1
practicalli-johnny14:12:52

@ericdallo Is it possible to have the lsp-ui-doc popup on a key binding, rather than being automatic? What would be the interactive function to call for that (if possible). I do like the popup presentation, but only want to see it when I explicitly call for it.

👍 1
practicalli-johnny14:12:01

If its not possible to have a key binding for lsp-doc-ui or not likely to be added, I can continue using the lsp-describe-thing-at-point instead

ericdallo14:12:59

AFAIK is lsp-ui-doc-show the command that you can add a keybinding for it

practicalli-johnny14:12:59

Ah, I need to enable the lsp-doc-ui for that to work, that was my confusion. So I can get a manual only lsp-ui-doc window by creating a key binding for lsp-ui-doc-show and lsp-ui-doc-hide and switch off the automatic popups. Thanks

lsp-ui-doc-enable t               ;; lsp ui doc popup enabled
          lsp-ui-doc-show-with-cursor nil   ;; doc popup for cursor
          lsp-ui-doc-show-with-mouse nil    ;; doc popup for mouse

yes 1