snacks.nvim
snacks.nvim copied to clipboard
feat(gitbrowse): add copy_url to gitbrowse
Description
Adds the copy_url function to gitbrowse to copy the url directly to the clipboard instead of opening it in the browser
The open handler for opening urls is exposed in the settings already. You can just do
map({"n", "x" }, "<leader>gY", function()
Snacks.gitbrowse({ open = function(url) vim.fn.setreg("+", url) end, notify = false })
end, { desc = "Git Browse (copy)" })
to implement this functionality which is a lot simpler.
This PR is stale because it has been open 30 days with no activity.