Update lazygit

This commit is contained in:
Karolis Arbaciauskas 2025-01-01 20:22:33 +02:00
parent c0e189e56f
commit d625f9c8cb
No known key found for this signature in database
3 changed files with 30 additions and 40 deletions

View File

@ -995,7 +995,6 @@ require('lazy').setup({
require 'kickstart.plugins.indent_line', require 'kickstart.plugins.indent_line',
require 'kickstart.plugins.lint', require 'kickstart.plugins.lint',
require 'kickstart.plugins.autopairs', require 'kickstart.plugins.autopairs',
-- require 'kickstart.plugins.neo-tree',
require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`

View File

@ -1,20 +1,36 @@
return { return {
'kdheepak/lazygit.nvim', 'folke/snacks.nvim',
lazy = true, ---@diagnostic disable-next-line: undefined-doc-name
cmd = { ---@type snacks.Config
'LazyGit', opts = {
'LazyGitConfig', lazygit = {
'LazyGitCurrentFile', -- your lazygit configuration comes here
'LazyGitFilter', -- or leave it empty to use the default settings
'LazyGitFilterCurrentFile', -- refer to the configuration section below
}, },
dependencies = {
'nvim-lua/plenary.nvim',
}, },
keys = { keys = {
{ '<leader>gg', '<cmd>LazyGit<cr>', desc = 'Lazygit (Root Dir)' }, {
{ '<leader>gf', '<cmd>LazyGitFilterCurrentFile<cr>', desc = 'Lazygit Current File History' }, '<leader>gg',
{ '<leader>gl', '<cmd>LazyGitFilter<cr>', desc = 'Lazygit log' }, function()
Snacks.lazygit { cwd = vim.fn.getcwd() }
end,
{ desc = 'Lazygit (Root Dir)' },
},
{
'<leader>gf',
function()
Snacks.lazygit.log_file()
end,
{ desc = 'Lazygit Current File History' },
},
{
'<leader>gl',
function()
Snacks.lazygit.log { cwd = vim.fn.getcwd() }
end,
{ desc = 'Lazygit Log' },
},
{ '<leader>gb', '<cmd>Gitsigns blame<cr>', desc = 'Git blame' }, { '<leader>gb', '<cmd>Gitsigns blame<cr>', desc = 'Git blame' },
{ '<leader>gs', '<cmd>Telescope git_status<CR>', desc = 'Git Status' }, { '<leader>gs', '<cmd>Telescope git_status<CR>', desc = 'Git Status' },
}, },

View File

@ -1,25 +0,0 @@
-- Neo-tree is a Neovim plugin to browse the file system
-- https://github.com/nvim-neo-tree/neo-tree.nvim
return {
'nvim-neo-tree/neo-tree.nvim',
version = '*',
dependencies = {
'nvim-lua/plenary.nvim',
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
'MunifTanjim/nui.nvim',
},
cmd = 'Neotree',
keys = {
{ '\\', ':Neotree reveal<CR>', desc = 'NeoTree reveal', silent = true },
},
opts = {
filesystem = {
window = {
mappings = {
['\\'] = 'close_window',
},
},
},
},
}