Question about LSP usage
I am using LSP from within Doom Emacs with evil enabled.
-
Code actions: When there is only one available code action,
lsp-execute-code-actionautomatically executes the action without asking me to confirm first, this is problematic since often I just want to see what code actions are available on a line, without necessarily executing them. What is the workaround for this? -
The intellisense messages on the right side of the screen are often truncated due to a lack of space on my screen. How can I view the entire message when this is the case? Surely there's a better way than just
flycheck-list-errorssince I have to actually visually search where in the list the error/warning corresponding to my current line is. Add further to this fact the ID columns on that interface is often truncated
(And tangentially related: why does flycheck-list-errors provide a different error list than consult-lsp-diagnostics? I have an example of this which I can produce upon demand.)
- When LSP shows some information about what I'm typing in the minibuffer, how can I choose to view that information in full? See the image below. You can even see the "1/3" page label. How do I access those pages? If I press
ESCso I can pressK, pressingESCgets rid of the message in the minibuffer and then attempting to pressKwill simply yieldLSP :: No content at point.
next-error/flycheck-next-errordoes not let you navigate to warnings (despite warnings appearing in the flycheck 'error' list). Is there a command that also lets me navigate to the next/previous warning?
- Are there any other LSP usage tips I should know about?
Posted Dec 10, 2022, 9:24 PM UTC
Consult method works on global list, flycheck works on buffer list. This is limitation of flycheck
M-n/M-p
Not sure about that one, it works fine on my side.
Most likely yes.
I have this in my config:
But this has no effect, and upon inspection the variable value always turns out to be set to
t. (something keeps overriding the value for some reason)After lsp-mode not lsp
Ah, my bad.
About (2). Compare these two screenshots:`consult-lsp-diagnostics`: https://i.imgur.com/gPHqVhM.png`flycheck-list-errors`: https://i.imgur.com/ZXHgf6p.png
These screenshots are from the same buffer. And moreover, the consult method is producing the shorter list of the two.
About (3). Now I know how to navigate forwards and backwards between pages. But what do I do when the page I want to read is too big to be displayed inside the mininbuffer and is truncated. It is not displayed inside the *Messages* buffer.