Copy file/blame git links directly from neovim.
Copy and Open remote file and blame links directly from neovim. All exposed commands can be used with or without a visual range; the links will be generated accordingly. The module will try to not generate or open links for files/branches/changes that don't exist on the remote, and display an error instead.
Inspired by tpope/vim-fugitive and ruifm/gitlinker.nvim.
- GitHub
- GitLab
- git
- plenary.nvim for internal functions
return {
'liouk/gitlinks.nvim',
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
require('gitlinks').setup()
end,
}
No configuration is necessary for this plugin.
The plugin exposes the following commands:
:GitlinkFileCopy
: copy file link:GitlinkFileOpen
: open file link on system browser:GitlinkBlameCopy
: copy file blame link:GitlinkBlameOpen
: open file blame link on system browser
All commands support visual ranges.