snacks.nvim icon indicating copy to clipboard operation
snacks.nvim copied to clipboard

feat(gitbrowse): add copy_url to gitbrowse

Open barnabasJ opened this issue 8 months ago • 2 comments

Description

Adds the copy_url function to gitbrowse to copy the url directly to the clipboard instead of opening it in the browser

barnabasJ avatar Apr 16 '25 19:04 barnabasJ

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.

dpetka2001 avatar Apr 17 '25 08:04 dpetka2001

This PR is stale because it has been open 30 days with no activity.

github-actions[bot] avatar May 18 '25 02:05 github-actions[bot]