♻️ refactor(git-plugins): create a git category and move relevant plugins there

Moved git plugins into their own category
This commit is contained in:
2024-08-17 00:41:28 -04:00
parent 27e429df43
commit 82cc6d8757
4 changed files with 253 additions and 114 deletions
+30
View File
@@ -0,0 +1,30 @@
local M = {}
function M.gitgraph_draw()
-- open gitgraph in a seperate tab
if vim.bo.filetype == "gitgraph" then
return
end
vim.cmd("tab split")
require("gitgraph").draw({}, { all = true, max_count = 5000 })
end
function M.gitgraph_close()
--- close the tab page if it is a gitgraph page
if vim.bo.filetype == "gitgraph" then
vim.cmd("tabclose")
else
return
end
end
function M.gitgraph_toggle()
-- toggle gitgraph
if vim.bo.filetype == "gitgraph" then
M.gitgraph_close()
else
M.gitgraph_draw()
end
end
return M