You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Eldoc doesn't show anything when I put cursor on a variable / symbol
lsp-mode version 9e36009adc78309954983b045068e9bd05d293c7 (latest commit as of now)
lsp-java version 37c95ef (latest commit as of now)
Note
I have made the following edit to lsp-eldoc-function to make it work. I am not sure what is the difference between lsp--capability and lsp-feature? but one returns nil and the other t
(defunlsp-eldoc-function (cb&rest_ignored)
"`lsp-mode' eldoc function to display hover info (based on `textDocument/hover')."
(if (and lsp--hover-saved-bounds
(lsp--point-in-bounds-p lsp--hover-saved-bounds))
lsp--eldoc-saved-message
(setq lsp--hover-saved-bounds nil
lsp--eldoc-saved-message nil)
(if (looking-at-p"[[:space:]\n]")
(setq lsp--eldoc-saved-message nil) ; And returns nil.
(when (and lsp-eldoc-enable-hover
;; (lsp--capability :hoverProvider) ;;;;; removed this and replaced with the next line
(lsp-feature? "textDocument/hover"))
(lsp-request-async
"textDocument/hover"
(lsp--text-document-position-params)
(-lambda ((hover &as &Hover? :range?:contents))
(setq lsp--hover-saved-bounds (when range?
(lsp--range-to-region range?)))
(funcall cb (setq lsp--eldoc-saved-message
(when contents
(lsp--render-on-hover-content
contents
lsp-eldoc-render-all)))))
:error-handler#'ignore:mode'tick:cancel-token:eldoc-hover)))))
To Reproduce
With the original code, put cursor on a variable, with eldoc-mode on and lsp-managed-mode on, nothing is printed to the minibuffer.
Expected behavior
Type info is shown in the minibuffer
The text was updated successfully, but these errors were encountered:
Describe the bug
Eldoc doesn't show anything when I put cursor on a variable / symbol
lsp-mode version 9e36009adc78309954983b045068e9bd05d293c7 (latest commit as of now)
lsp-java version 37c95ef (latest commit as of now)
Note
I have made the following edit to
lsp-eldoc-function
to make it work. I am not sure what is the difference betweenlsp--capability
andlsp-feature?
but one returnsnil
and the othert
To Reproduce
With the original code, put cursor on a variable, with eldoc-mode on and lsp-managed-mode on, nothing is printed to the minibuffer.
Expected behavior
Type info is shown in the minibuffer
The text was updated successfully, but these errors were encountered: