Add <leader>dy mapping to yank diagnostic message (wip)

This commit is contained in:
2022-02-01 22:51:02 +03:00
parent 317c8c720f
commit cecf188adc
3 changed files with 30 additions and 1 deletions

View File

@@ -38,4 +38,13 @@ M.list_includes_item = function(list, item)
return false
end
M.yank = function(message)
if vim.fn.has("win32") == 1 then
os.execute("echo '" .. message .. "' | win32yank -i")
else
-- i use wayland, so there is no xclip for X11
os.execute("echo -n '" .. message .. "' | wl-copy")
end
end
return M