feat(tree-sitter): goto functionality

This commit is contained in:
Jeetaditya Chatterjee 2022-01-24 18:32:38 +00:00
parent 75897af036
commit 89f82428e6
No known key found for this signature in database
GPG key ID: 09D54CECD2132B91
2 changed files with 36 additions and 1 deletions

View file

@ -0,0 +1,10 @@
;;; tools/tree-sitter/autoload.el -*- lexical-binding: t; -*-
;;;###autoload
(defun +tree-sitter-goto-textobj (group &optional previous end query)
"Thin wrapper that returns the symbol of a named function, used in keybindings."
(let ((sym (intern (format "+goto%s%s-%s" (if previous "-previous" "") (if end "-end" "") group))))
(fset sym (lambda ()
(interactive)
(evil-textobj-tree-sitter-goto-textobj group previous end query)))
sym))