Files
keycodex/lua/plugins/barbecue.lua
T
2024-08-16 02:51:57 +05:45

41 lines
1.1 KiB
Lua

return {
'utilyre/barbecue.nvim',
name = 'barbecue',
version = '*',
event = { 'BufReadPost', 'BufAdd', 'BufNewFile' },
dependencies = {
'SmiteshP/nvim-navic',
'nvim-tree/nvim-web-devicons', -- optional dependency
},
opts = {},
keys = {
{
'<leader>bq',
function()
require('barbecue.ui').toggle()
end,
desc = 'toggle barbecue',
},
},
config = function()
require('barbecue').setup({
create_autocmd = false, -- prevent barbecue from updating itself automatically
})
vim.api.nvim_create_autocmd({
'WinScrolled', -- or WinResized on NVIM-v0.9 and higher
'BufWinEnter',
'CursorHold',
'InsertLeave',
-- include this if you have set `show_modified` to `true`
-- "BufModifiedSet",
}, {
group = vim.api.nvim_create_augroup('barbecue.updater', {}),
callback = function()
require('barbecue.ui').update()
end,
})
end,
}