nvim-treesitter-textobjects icon indicating copy to clipboard operation
nvim-treesitter-textobjects copied to clipboard

Lookbehind local keymap setting

Open ilan-schemoul opened this issue 1 year ago • 2 comments

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 }, 
          }
        }
      }

ilan-schemoul avatar Mar 30 '24 22:03 ilan-schemoul

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.

ribru17 avatar Apr 10 '24 15:04 ribru17

The development is now done in main and master is frozen. Can you open a new PR with this feature?

kiyoon avatar Dec 04 '24 05:12 kiyoon