Example in the readme for defining your own queries does not work for (built in) treesit
Closed this issue · 1 comments
Schievel1 commented
I think the example in the Readme for defining your own queries does not work for treesit because it expects slightly different queries.
(https://github.com/meain/evil-textobj-tree-sitter#custom-textobjects)
Says
evil-motion-range: Wrong type argument: treesit-query-p, [(import_statement) @import]
for example.
By exchanging the [] with () treesit-query-p is satisfied:
(define-key evil-outer-text-objects-map "i" (evil-textobj-tree-sitter-get-textobj "cond"
'(
(c-ts-mode . ((if_statement) @cond))
)))
meain commented
Thank you. Looks like (
works for tree-sitter
and treesit
and so I've change the readme to use that instead.