Skip to content

Commit

Permalink
Update docs for custom-textobjects for treesit
Browse files Browse the repository at this point in the history
fixed #124
  • Loading branch information
meain committed Sep 28, 2024
1 parent b4ef204 commit 5056ebc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ to work for_
;; 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]))))
'((python-mode . ((import_statement) @import)) ;; default modes (using tree-sitter)
(python-ts-mode . ((import_statement) @import)) ;; treesit modes
(rust-mode . ((use_declaration) @import)))))
```

## Goto
Expand Down

0 comments on commit 5056ebc

Please sign in to comment.