5
submitted 5 months ago by claim_arguably@lemdro.id to c/emacs@lemmy.ml

Lsp errors that shows when cursor on line that has the error?

I would like to have a keybind for this

top 1 comments
sorted by: hot top new old
[-] donio@lemmy.world 2 points 5 months ago* (last edited 5 months ago)

edit: I missed that it's LSP messages. Assuming eglot you can get them in a buffer using M-x flymake-show-buffer-diagnostics

original:

I don't use Doom specifically in general you'd do this by switching to the *Messages* buffer and copy the relevant lines from there as usual.

If you really wanted a command for it you could do something like this:

(defun my-copy-last-messages (n)
  (interactive "p")
  (with-current-buffer "*Messages*"
    (copy-region-as-kill
     (line-beginning-position
      (- 1 n))
     (point-max))))

This assumes that the cursors is at the end of the Messages buffer as usual. Not sure if that line positioning is correct, only tested it briefly.

this post was submitted on 04 Apr 2026
5 points (100.0% liked)

Emacs

2957 readers
1 users here now

Our infinitely powerful editor.

founded 6 years ago
MODERATORS