Giter VIP home page Giter VIP logo

Comments (2)

meain avatar meain commented on June 9, 2024 1

Since this package does not bind anything by default, I think you should be able to have the evil bind create a function and only call this package's function if tree sitter mode is active. Even though lispyville does bind the items, I think you should be able to rebind it afterwords to call you function and pass the args over to the proper function based on if tree-sitter mode is active. I have not been able to give a shot and try if it works for sure, but that is what I think we could do.

from evil-textobj-tree-sitter.

meliache avatar meliache commented on June 9, 2024 1

It's true that you don't bind anything by default, which is why I don't regard this issue as a bugfix report. But I think we could add some configuration hints to the readme and maybe there will be an easier way to toggle treesitter text objects.

In the lispyville issue, @noctuid gives a similar recommendation to yours:

The workaround for now would be to bind the keys yourself to a menu item that selects a different text object depending on whether lispyville-mode is enabled. You can use general-predicate-dispatch to simplify this (it is a small macro you can copy if you do not use general.el).

They also write that they will try using an approach with a specific keymap

I will continue looking. Maybe I could create a lispyville-inner-text-objects-map, for example, that inherits from evil-inner-text-objects-map and bind that in 'operator lispyville-mode-map. I will try that and see if it works.

If that works, I might consider such an approach to configure evil-textobj-tree-sitter as well and might do a PR if that works well :)

from evil-textobj-tree-sitter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.