This commit is contained in:
Your Name 2026-07-12 11:41:53 +08:00
parent daa4d6cd19
commit 7e9df68c79
2 changed files with 16 additions and 37 deletions

View File

@ -13,6 +13,8 @@ vim.pack.add({
{ src = 'https://github.com/kristijanhusak/vim-dadbod-ui' },
{ src = 'https://github.com/kristijanhusak/vim-dadbod-completion' },
{ src = 'https://github.com/thesimonho/kanagawa-paper.nvim' },
{ src = 'https://github.com/NeogitOrg/neogit' },
{ src = 'https://github.com/sindrets/diffview.nvim' },
})
-- =============================================================================

View File

@ -1,3 +1,16 @@
-- NEOGIT
require('neogit').setup {
integrations = {
telescope = true,
diffview = true,
},
sections = {
untracked = { folded = false },
unstaged = { folded = false },
staged = { folded = false },
},
}
-- "Git Mapping
function GitPullAndNotify()
vim.notify('Pull Processing...', vim.log.levels.INFO, {
@ -197,40 +210,4 @@ end, {
silent = true,
})
return {
{
'NeogitOrg/neogit',
dependencies = {
'nvim-lua/plenary.nvim', -- required
'sindrets/diffview.nvim', -- optional - for diff view
'nvim-telescope/telescope.nvim', -- optional - for telescope integration
},
config = function()
require('neogit').setup {
-- Neogit configuration
integrations = {
telescope = true,
diffview = true,
},
sections = {
untracked = {
folded = false,
},
unstaged = {
folded = false,
},
staged = {
folded = false,
},
},
}
-- Branch-specific keymaps
vim.keymap.set('n', '<leader>gb', '<cmd>Neogit branch<cr>', {
desc = '[G]it [B]ranch menu',
noremap = true,
silent = true,
})
end,
},
}
return {}