Skip to content

Switch between documentation and diagnostic on a single line #898

Answered by joaotavora
vfsoraki asked this question in Q&A
Discussion options

You must be logged in to vote

I think you can ask eldoc to show flymake diagnostics as a documentation item when within Eglot, and you can optionally also tell Eldoc to display all its items at once. By default, Eglot only shows the signature and hover info items. And by default it will show only one, the most important of the two at once.

Try this 100% untested snippet in your .emacs.

(add-hook 'eglot-managed-mode-hook (lambda ()
  (push #'flymake-eldoc-function eldoc-documentation-functions)
  (setq eldoc-documentation-strategy #'eldoc-documentation-compose) ;optional
))

Personally, to solve your problem I bind M-p and M-n to flymake-goto-prev-error and flymake-goto-next-error. When they land me on an error, they te…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@joaotavora
Comment options

@vfsoraki
Comment options

@aclonegeek
Comment options

@vfsoraki
Comment options

@rileyrg
Comment options

Answer selected by joaotavora
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants