Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to create custom textobjects by providing a query #1

Merged
merged 3 commits into from
Aug 31, 2021

Conversation

meain
Copy link
Owner

@meain meain commented Aug 15, 2021

;; The first arguemnt to `evil-textobj-tree-sitter-get-textobj' will be the capture group to use
;; and the second arg will be an alist mapping major-mode to the corresponding query to use.
(define-key evil-outer-text-objects-map "m" (evil-textobj-tree-sitter-get-textobj "import"
                                              '((python-mode . [(import_statement) @import])
                                                (rust-mode . [(use_declaration) @import]))))

@meain meain force-pushed the custom-captures branch 3 times, most recently from 4859ea3 to 50d47e5 Compare August 22, 2021 05:44
@meain meain mentioned this pull request Aug 22, 2021
@meain meain force-pushed the custom-captures branch 4 times, most recently from 54a4c58 to 445eec0 Compare August 31, 2021 16:08
@meain meain merged commit 932da76 into master Aug 31, 2021
@meain meain deleted the custom-captures branch August 31, 2021 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant