feat: add keybind to navigate barbecue nvim

This commit is contained in:
Youwen Wu 2024-10-10 13:42:50 -07:00
parent bb5e0f6ab2
commit cfef8a7ef8
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3

View file

@ -189,28 +189,17 @@ return {
{
"barbecue.nvim",
event = "BufEnter",
after = function()
-- triggers CursorHold event faster
vim.opt.updatetime = 200
require("barbecue").setup({
create_autocmd = false, -- prevent barbecue from updating itself automatically
})
vim.api.nvim_create_autocmd({
"WinResized",
"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()
keys = {
{
"<C-j>",
function()
require("barbecue.ui").navigate(-1)
end,
})
desc = "Go to last treesitter node",
},
},
after = function()
require("barbecue").setup()
end,
},
{