Skip to content

Commit

Permalink
fix: filetype specific keybindings sometimes break
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenxxiu committed Jun 18, 2024
1 parent c30f2b0 commit a3bcf03
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/various-textobjs/default-keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,10 @@ function M.setup(disabled_keymaps)
keymap( { "o", "x" }, "aI" , "<cmd>lua require('various-textobjs').indentation('outer', 'outer')<CR>", { 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
Expand Down

0 comments on commit a3bcf03

Please sign in to comment.