refactor: reorganize post-configuration functions into utils module
This commit is contained in:
+2
-23
@@ -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",
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user