🐙 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:
+23
-3
@@ -121,14 +121,34 @@ return {
|
|||||||
{ -- Hardtime
|
{ -- Hardtime
|
||||||
"m4xshen/hardtime.nvim",
|
"m4xshen/hardtime.nvim",
|
||||||
dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim" },
|
dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim" },
|
||||||
opts = {},
|
opts = function()
|
||||||
cond = function()
|
|
||||||
if
|
if
|
||||||
vim.fn.readfile(vim.fn.stdpath("config") .. "/.hardtime")[1]
|
vim.fn.readfile(vim.fn.stdpath("config") .. "/.hardtime")[1]
|
||||||
== "true"
|
== "true"
|
||||||
then
|
then
|
||||||
return true
|
return { enabled = true }
|
||||||
|
else
|
||||||
|
return { enabled = false }
|
||||||
end
|
end
|
||||||
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",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user