🐙 Add GitLinker

- Quickly create (and yank) links to code blocks on git repos
- Select text in nvim -> Get link on github

- Tweak to hardtime:
  - Always include hardtime plugin
  - Toggle 'enabled' setting with .hardtime
This commit is contained in:
2024-07-22 17:56:57 -04:00
parent 87ede3565e
commit 8bfaed4e73
+23 -3
View File
@@ -121,14 +121,34 @@ return {
{ -- Hardtime
"m4xshen/hardtime.nvim",
dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim" },
opts = {},
cond = function()
opts = function()
if
vim.fn.readfile(vim.fn.stdpath("config") .. "/.hardtime")[1]
== "true"
then
return true
return { enabled = true }
else
return { enabled = false }
end
end,
},
{ -- GitLinker
"linrongbin16/gitlinker.nvim",
cmd = "GitLink",
opts = {},
keys = {
{
"<leader>gy",
"<cmd>GitLink<cr>",
mode = { "n", "v" },
desc = "Yank git link",
},
{
"<leader>gY",
"<cmd>GitLink!<cr>",
mode = { "n", "v" },
desc = "Open git link",
},
},
},
}