refactor: reorganize post-configuration functions into utils module

This commit is contained in:
2024-09-15 06:14:16 -04:00
parent 651e931ce3
commit da34d98a1c
14 changed files with 924 additions and 518 deletions
+2 -23
View File
@@ -13,7 +13,7 @@ return {
"Rawnly/gist.nvim",
lazy = true,
cmd = data.cmd.gist,
keys = data.keys.gist,
keys = data.keys.gist.func,
config = true,
},
{ -- LazyGit
@@ -46,28 +46,7 @@ return {
},
{ -- Git Graph
"isakbm/gitgraph.nvim",
opts = {
symbols = data.types.gitgraph.symbols(),
format = {
timestamp = data.types.gitgraph.timestamp,
fields = data.types.gitgraph.fields,
},
hooks = {
-- Check diff of a commit
on_select_commit = function(commit)
vim.notify("DiffviewOpen " .. commit.hash .. "^!")
vim.cmd(":DiffviewOpen " .. commit.hash .. "^!")
end,
-- Check diff from commit a -> commit b
on_select_range_commit = function(from, to)
vim.notify("DiffviewOpen " .. from.hash .. "~1.." .. to.hash)
vim.cmd(":DiffviewOpen " .. from.hash .. "~1.." .. to.hash)
end,
},
},
opts = data.types.gitgraph.opts,
keys = data.keys.gitgraph,
},
{ -- Telescope Git Worktree
"ThePrimeagen/git-worktree.nvim",
},
}