nvim-treesitter-textobjects
nvim-treesitter-textobjects copied to clipboard
Lookbehind local keymap setting
Problem : #156 we may want a global setting (e.g: lookahead) for most keymaps and then override that setting for one keymap (e.g: lookbehind) You can now add a local lookbehind/lookahead in the keymap that takes precedence :
textobjects = {
select = {
enable = true,
lookahead = true,
keymaps = {
["t="] = { query = "@type", desc = "Select right hand side of an assignment", lookbehind = true },
}
}
}
Thank you for the contribution! I think we may have to wait on merging this until https://github.com/nvim-treesitter/nvim-treesitter-textobjects/pull/523, due to the nature of the change.
The development is now done in main and master is frozen. Can you open a new PR with this feature?