From cfef8a7ef8d183d0a500c8c64431cc6b925dcaf2 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Thu, 10 Oct 2024 13:42:50 -0700 Subject: [PATCH] feat: add keybind to navigate barbecue nvim --- lua/plugins/lz-spec.lua | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/lua/plugins/lz-spec.lua b/lua/plugins/lz-spec.lua index c98ede3..5e7287f 100644 --- a/lua/plugins/lz-spec.lua +++ b/lua/plugins/lz-spec.lua @@ -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 = { + { + "", + function() + require("barbecue.ui").navigate(-1) end, - }) + desc = "Go to last treesitter node", + }, + }, + after = function() + require("barbecue").setup() end, }, {