Neovim plugin that copies diagnostics to your system clipboard.
- Collects all unique diagnostics in the current buffer
- Joins their messages with newlines
- Copies the result to the
+clipboard register so you can paste anywhere
Note: The default mapping copies every diagnostic in the buffer, not just the message under your cursor.
- Open a buffer that has diagnostics (via built-in LSP, linting, etc.).
- Press
<Leader>cyto copy all diagnostic messages in the buffer. - Paste from the system clipboard as usual (for example,
<C-v>in your terminal).
{
"NickStafford2/copy-diagnostics.nvim",
}The plugin is configured through vim.g.copy_diagnostics_configuration. Below
is the default configuration; override any value you need.
{
"NickStafford2/copy-diagnostics.nvim",
config = function()
vim.g.copy_diagnostics_configuration = {
keymap = {
all = "<Leader>cy", -- copy all diagnostics in the buffer
cursor = "<Leader>cY", -- reserved for future per-cursor copy
},
}
end,
}See doc/news.txt for updates. You can also follow the RSS feed:
https://github.com/NickStafford2/copy-diagnostics.nvim/commits/main/doc/news.txt.atom