๐ Code-link.nvim
Neovim plugin that make sharing code location easier written in Lua
Screen.Recording.2024-02-10.at.22.01.26.mov
It is suggested to either use the latest release tag
Install with Lazy.nvim
require("lazy").setup({
"mistricky/code-link.nvim",
-- ...
})
There is only one command CodeLink
you need to use, which allows you to create a share link by your origin address and branch name of the current git repository. And if you want to specify the branch name explicitly, just pass the branch name as args to the CodeLink
command:
CodeLink branch_name # Create a share link with specific branch name
CodeLink # Create a share link with the current branch name
You can pass some configure items by the setup
function, here is an example show you how to configure code-link
:
require('code-link').setup({
-- (Optional) Use value of the "origin" of git remote config by default
origin = '...',
-- (Optional) If the copy_command is passed, code-link will exec the copy_command after generated share link every time
copy_command = function(link)
return 'echo "' .. link .. '" | pbcopy'
end,
})
MIT.