@@ -64,10 +64,10 @@ require("nvim-treesitter-textobjects").setup {
6464
6565-- keymaps
6666-- You can use the capture groups defined in `textobjects.scm`
67- vim .keymap .set ({ " x" , " o" }, " af " , function ()
67+ vim .keymap .set ({ " x" , " o" }, " am " , function ()
6868 require " nvim-treesitter-textobjects.select" .select_textobject (" @function.outer" , " textobjects" )
6969end )
70- vim .keymap .set ({ " x" , " o" }, " if " , function ()
70+ vim .keymap .set ({ " x" , " o" }, " im " , function ()
7171 require " nvim-treesitter-textobjects.select" .select_textobject (" @function.inner" , " textobjects" )
7272end )
7373vim .keymap .set ({ " x" , " o" }, " ac" , function ()
@@ -112,6 +112,13 @@ require("nvim-treesitter-textobjects").setup {
112112 },
113113}
114114
115+ -- disable built-in vim keymaps to avoid conflicts (add as you like)
116+ vim .g .no_python_maps = true
117+ vim .g .no_ruby_maps = true
118+ vim .g .no_rust_maps = true
119+ vim .g .no_go_maps = true
120+ -- vim.g.no_plugin_maps = true -- disable entire ftplugin mappings if you know what you're doing
121+
115122-- keymaps
116123-- You can use the capture groups defined in `textobjects.scm`
117124vim .keymap .set ({ " n" , " x" , " o" }, " ]m" , function ()
@@ -198,8 +205,6 @@ vim.keymap.set({ "n", "x", "o" }, "<end>", function()
198205end )
199206```
200207
201- For a similar way of making arbitrary movements repeatable, see [ nvim-next] ( https://github.com/ghostbuster91/nvim-next ) .
202-
203208# Overriding or extending textobjects
204209
205210Textobjects are defined in the ` textobjects.scm ` files.
0 commit comments