kickstart.nvim/lua/custom/plugins/snacks.lua

46 lines
1 KiB
Lua
Raw Normal View History

2025-03-09 18:56:07 +02:00
vim.api.nvim_create_user_command('DeleteOtherBuffers', function()
require('snacks').bufdelete.other()
end, { desc = 'Delete Other Buffers' })
2024-11-03 00:27:08 +02:00
return {
2025-01-01 20:22:33 +02:00
'folke/snacks.nvim',
---@diagnostic disable-next-line: undefined-doc-name
---@type snacks.Config
opts = {
2025-03-09 18:56:07 +02:00
lazygit = {},
gitbrowse = {},
2024-11-03 00:27:08 +02:00
},
keys = {
2025-01-01 20:22:33 +02:00
{
'<leader>gg',
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' },
},
2024-11-03 00:27:08 +02:00
{ '<leader>gb', '<cmd>Gitsigns blame<cr>', desc = 'Git blame' },
{ '<leader>gs', '<cmd>Telescope git_status<CR>', desc = 'Git Status' },
2025-03-09 18:56:07 +02:00
{
'<leader>go',
function()
Snacks.gitbrowse()
end,
desc = 'Git Browse',
},
2024-11-03 00:27:08 +02:00
},
}