Skip to content

feat(tree-sitter): restore evil-textobj-tree-sitter integration#21

Draft
ecoezen wants to merge 1 commit into
doomemacs:mainfrom
ecoezen:feat/tree-sitter-evil-textobjs
Draft

feat(tree-sitter): restore evil-textobj-tree-sitter integration#21
ecoezen wants to merge 1 commit into
doomemacs:mainfrom
ecoezen:feat/tree-sitter-evil-textobjs

Conversation

@ecoezen

@ecoezen ecoezen commented Jun 29, 2026

Copy link
Copy Markdown

Replace the dead tree-sitter-mode' minor mode with a new +tree-sitter-textobjs-mode' minor mode, scoped to all *-ts-mode' buffers registered via set-tree-sitter!'.

This restores:

  • Structural text objects: A(parameter), f(function), F(call) etc.
  • Goto navigation with [g/]g prefix with the same keys.
  • which-key label cleanup for generated fucntion names.
  • the documented `+tree-sitter-*-map' rebinding API

The minor mode is defined eagerly via :init so that set-tree-sitter!' (called from :lang module :init blocks) can register hooks to the correct mode hooks via fboundp'.

Updates README.org with package and scoping documentation and minor typos.

** this PR likely finishes what doomemacs/core#7623 started.


  • I searched the issue tracker and this hasn't been PRed before.
  • My changes are not on the do-not-PR list for this project.
  • My commits conform to Doom's git conventions.
  • I am blindly checking these off.
  • This PR contains AI-generated work.
  • Any relevant issues or PRs have been linked to.
  • This a draft PR; I need more time to finish it.

Replace the dead `tree-sitter-mode' minor mode with a new
`+tree-sitter-textobjs-mode' minor mode, scoped to all `*-ts-mode'
buffers registered via `set-tree-sitter!'.

This restores:
- Structural text objects: A(parameter), f(function), F(call) etc.
- Goto navigation with [g/]g prefix with the same keys.
- which-key label cleanup for generated fucntion names.
- the documented `+tree-sitter-*-map' rebinding API

The minor mode is defined eagerly via :init so that
`set-tree-sitter!' (called from :lang module :init blocks) can
register hooks to the correct mode hooks via `fboundp'.

Updates README.org with package and scoping documentation and minor typos.
@hlissner hlissner added :tools tree-sitter +evil For users with evil/vim emulation enabled labels Jul 1, 2026
@hlissner hlissner marked this pull request as draft July 1, 2026 18:19
@hlissner

hlissner commented Jul 1, 2026

Copy link
Copy Markdown
Member

Just letting you know I've seen this, but will need a couple weeks of dogfooding this to decide whether evil-textobj-tree-sitter is the package we should support (versus combobulate). Plus I'm a little preoccupied with v3 development. Thanks for bringing it to my attention, in any case!

@hlissner hlissner added this to the TBD milestone Jul 1, 2026
@ecoezen

ecoezen commented Jul 1, 2026

Copy link
Copy Markdown
Author

Just letting you know I've seen this, but will need a couple weeks of dogfooding this to decide whether evil-textobj-tree-sitter is the package we should support (versus combobulate). Plus I'm a little preoccupied with v3 development. Thanks for bringing it to my attention, in any case!

no worries! sure, use it or trash it as you see fit. combobulate seemed a bit unstable and too much work for me, but it seems really nice. why not supporting both and allow users alternate one over another(edit: combobulate is kinda active manipulation of ast nodes, and not actually direct alternative to the textobjs imo)? i guess most evil users would fall for textobjs (for passive manipulation) (perhaps i am biased). anyway, thanks for letting me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

+evil For users with evil/vim emulation enabled :tools tree-sitter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants