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

feature: Make gitbrowse.get_url actually public

Open dmtrKovalenko opened this issue 8 months ago • 2 comments

Did you check the docs?

  • [x] I have read all the snacks.nvim docs

Is your feature request related to a problem? Please describe.

My goal make a binding that copies url to clipboard instead of opens to replicate gitlinkier behavior

Currently the function is mostly unusable without repeating a half of the gitbrowse code even though it is public it requires to provide a repo, which I can get from the private get_repo method which requires an origin which requires this:

https://github.com/folke/snacks.nvim/blob/main/lua/snacks/gitbrowse.lua#L204-L212

Describe the solution you'd like

Either a primitive for copying to clipboard or ideally just a one function that returns url without a repo parameter

Describe alternatives you've considered

keep using gitlinker :D

Additional context

No response

dmtrKovalenko avatar Apr 29 '25 21:04 dmtrKovalenko

You can do the copy with something like this.

dpetka2001 avatar Apr 30 '25 08:04 dpetka2001

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

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

This issue was closed because it has been stalled for 7 days with no activity.

github-actions[bot] avatar Jun 07 '25 02:06 github-actions[bot]