Adding gitlinker and updating whichkey

This commit is contained in:
2023-11-24 10:55:23 +01:00
parent b32e2e60dc
commit d4b6d88dce
2 changed files with 40 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
return {
"linrongbin16/gitlinker.nvim",
cmd = {
"GitLink",
},
keys = {
{
"<leader>gl",
"<cmd>GitLink!<CR>",
mode = { "v", "n" },
desc = "Copies git link to highlighted code",
},
{
"<leader>gL",
"<cmd>GitLink<CR>",
mode = { "v", "n" },
desc = "Opens git link to highlighted code",
},
{
"<leader>gb",
"<cmd>GitLink! blame<CR>",
mode = { "v", "n" },
desc = "Copies git blame link to highlighted code",
},
{
"<leader>gB",
"<cmd>GitLink blame<CR>",
mode = { "v", "n" },
desc = "Opens git blame link to highlighted code",
},
},
config = function()
local gitlinker = require("gitlinker")
gitlinker.setup()
end,
}