claim_arguably@lemdro.id to Emacs@lemmy.mlEnglish · 7 days agoHow to copy diagnostic messages in doom emacs?message-squaremessage-square1linkfedilinkarrow-up15arrow-down10file-text
arrow-up15arrow-down1message-squareHow to copy diagnostic messages in doom emacs?claim_arguably@lemdro.id to Emacs@lemmy.mlEnglish · 7 days agomessage-square1linkfedilinkfile-text
Lsp errors that shows when cursor on line that has the error? I would like to have a keybind for this
minus-squaredonio@lemmy.worldlinkfedilinkarrow-up2·edit-26 days agoedit: 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.
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.