0

I'm trying out lsp-mode with default flymake for as-you-type error checking in JavaScipt. lsp-mode and language server were easy to set up. I type in some javascript and it underlines in red and mouse hover shows me the error. Brilliant! But I can't be hovering my mouse all the time due to RSI. I came to Emacs specifically to get a keyboard-driven workflow.

So I want to remap it so that I can see the errors when the text insertion point is in the error region, instead of the mouse cursor. Or maybe I can activate it with a key binding when I want to see what's at the text insertion point. The problem is I can't find how to remap/intercept this, or even see what functions are being called.

I tried C-h b and searched for every instance of "mouse" but none of them were about hovering.

I tried reading the elisp manual regarding mouse tracking, and it's possible lsp-mode or flymake is using the track-mouse special form to get this functionality, but I don't know how to track it down.

I tried putting the following in custom-set-variables:

'(help-at-pt-timer-delay 0.1)
'(help-at-pt-display-when-idle (quote (flymake-diagnostic)) nil (help-at-pt))

or

'(help-at-pt-timer-delay 0.1)
'(help-at-pt-display-when-idle (quote (lsp-hover)) nil (help-at-pt))

but the only feedback I can see is the type display in the minibuffer, and that doesn't seem to change when I reload without either of these configurations.

For example, if I misspell "funcion" in javascript, the mouse hover over the red-underlined symbols triggers ';' expected. in a popup window at the mouse cursor, but moving the keyboard point over it says any like it would at any part of the expression which just means it doesn't know what type it is.

Any ideas that will solve the re-mapping problem, or get me closer in my own attempts to track it down?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.