feat: remove diffview and adjust Neogit config
This commit is contained in:
parent
fa20c77607
commit
aeadb0a9d3
3 changed files with 43 additions and 41 deletions
|
@ -156,7 +156,6 @@
|
|||
mini-bufremove
|
||||
neogit
|
||||
gitsigns-nvim
|
||||
diffview-nvim
|
||||
barbecue-nvim
|
||||
undotree
|
||||
conform-nvim
|
||||
|
|
|
@ -12,6 +12,7 @@ return {
|
|||
require("plugins.render-markdown"),
|
||||
require("plugins.toggleterm"),
|
||||
require("plugins.by-lang.latex"),
|
||||
require("plugins.neogit"),
|
||||
{ "vim-wakatime" },
|
||||
{ "clangd_extensions.nvim" },
|
||||
{ "vim-sleuth" },
|
||||
|
@ -154,46 +155,6 @@ return {
|
|||
require("mini.hipatterns").setup()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"neogit",
|
||||
cmd = "Neogit",
|
||||
keys = {
|
||||
{
|
||||
"<leader>gg",
|
||||
function()
|
||||
vim.cmd.Neogit()
|
||||
end,
|
||||
desc = "Open neogit",
|
||||
mode = "n",
|
||||
},
|
||||
{
|
||||
"<leader>gc",
|
||||
function()
|
||||
vim.cmd.Neogit("kind=floating commit")
|
||||
end,
|
||||
desc = "Open neogit commit menu",
|
||||
mode = "n",
|
||||
},
|
||||
},
|
||||
before = function()
|
||||
local lz = require("lz.n")
|
||||
lz.trigger_load("diffview.nvim")
|
||||
lz.trigger_load("telescope.nvim")
|
||||
end,
|
||||
after = function()
|
||||
require("neogit").setup({
|
||||
graph_style = "unicode",
|
||||
integrations = {
|
||||
telescope = true,
|
||||
diffview = true,
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"diffiew.nvim",
|
||||
cmd = { "DiffviewOpen", "DiffviewClose", "DiffviewToggleFiles", "DiffviewFocusFiles", "DiffviewRefresh" },
|
||||
},
|
||||
{
|
||||
"barbecue.nvim",
|
||||
event = "BufEnter",
|
||||
|
|
42
lua/plugins/neogit.lua
Normal file
42
lua/plugins/neogit.lua
Normal file
|
@ -0,0 +1,42 @@
|
|||
return {
|
||||
"neogit",
|
||||
cmd = "Neogit",
|
||||
keys = {
|
||||
{
|
||||
"<leader>gg",
|
||||
function()
|
||||
vim.cmd.Neogit()
|
||||
end,
|
||||
desc = "Open neogit",
|
||||
mode = "n",
|
||||
},
|
||||
{
|
||||
"<leader>gc",
|
||||
function()
|
||||
vim.cmd.Neogit("kind=floating commit")
|
||||
end,
|
||||
desc = "Open neogit commit menu",
|
||||
mode = "n",
|
||||
},
|
||||
},
|
||||
before = function()
|
||||
local lz = require("lz.n")
|
||||
lz.trigger_load("telescope.nvim")
|
||||
end,
|
||||
after = function()
|
||||
local function graph_style()
|
||||
if os.getenv("TERM") == "xterm-kitty" then
|
||||
return "kitty"
|
||||
else
|
||||
return "ascii"
|
||||
end
|
||||
end
|
||||
require("neogit").setup({
|
||||
graph_style = graph_style(),
|
||||
integrations = {
|
||||
telescope = true,
|
||||
},
|
||||
kind = "replace",
|
||||
})
|
||||
end,
|
||||
}
|
Loading…
Reference in a new issue