From 0fecc1c60edd0e5d4d23a357450b80a373156799 Mon Sep 17 00:00:00 2001 From: Steven Xu Date: Tue, 18 Jun 2024 14:53:39 +1000 Subject: [PATCH] fix: filetype specific keybindings sometimes break --- lua/various-textobjs/default-keymaps.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/various-textobjs/default-keymaps.lua b/lua/various-textobjs/default-keymaps.lua index afba3de..65b5c4e 100644 --- a/lua/various-textobjs/default-keymaps.lua +++ b/lua/various-textobjs/default-keymaps.lua @@ -107,9 +107,10 @@ function M.setup(disabled_keymaps) keymap( { "o", "x" }, "aI" , "lua require('various-textobjs').indentation('outer', 'outer')", { desc = "outer-outer indentation textobj" }) -- stylua: ignore end + vim.api.nvim_create_augroup("VariousTextobjs", {}) for _, textobj in pairs(ftMaps) do vim.api.nvim_create_autocmd("FileType", { - group = vim.api.nvim_create_augroup("VariousTextobjs", {}), + group = "VariousTextobjs", pattern = textobj.fts, callback = function() for objName, map in pairs(textobj.map) do