meain / evil-textobj-tree-sitter

Tree-sitter powered textobjects for evil mode in Emacs
Apache License 2.0
199 stars 14 forks source link

Add support for bulitin tree-sitter along with elisp-tree-sitter #76

Closed meain closed 1 year ago

meain commented 1 year ago

Now that tree-sitter is will be lading in Emacs 29 soon, we should start adding support for that too along with elisp-tree-sitter.

d1egoaz commented 1 year ago

This will be great!

meain commented 1 year ago

Related(just adding for context): https://lists.gnu.org/archive/html/emacs-devel/2023-03/msg00500.html

This will be required for the ~switch~ addition.

meain commented 1 year ago

Another possibility is to switch to using textobjects from helix. While they are less fancier(for example will include { when selecting inside function), they should be simple and also help with issues like https://github.com/meain/evil-textobj-tree-sitter/issues/88 .

meain commented 1 year ago

We now have an experiemtnal version using builtin treesit in https://github.com/meain/evil-textobj-tree-sitter/pull/93 . I hope to dogfood it for a while before merging it.

RomeoV commented 1 year ago

FYI emacs-29 + integrated tree-sitter has been released https://lists.gnu.org/archive/html/emacs-devel/2023-07/msg00879.html.

ezmiller commented 1 year ago

Does this package currently not work with the built-in verison of tree-sitter? When I load the package, I do not see any of the evil-textobj.. functions.

meain commented 1 year ago

treesit support is still WIP (ref: https://github.com/meain/evil-textobj-tree-sitter/issues/76#issuecomment-1556091358) . That said, you should be seeing most evil-textobj.. functions without it(although they might not work with builtin treesit).

meain commented 1 year ago

This is now available in master.