diff options
author | Yuan Fu <casouri@gmail.com> | 2023-04-14 10:37:10 -0700 |
---|---|---|
committer | Yuan Fu <casouri@gmail.com> | 2023-04-14 16:54:22 -0700 |
commit | 531b343c3c73fb1a4270007ba189f478a252cfdb (patch) | |
tree | 9c6adb66d6e6760a9924e71c699e2b2d4f2ce55b /lisp | |
parent | 9e5c00268ed0ec9445a131ae676b2f3171535885 (diff) | |
download | emacs-531b343c3c73fb1a4270007ba189f478a252cfdb.tar.gz |
Add treesit-thing-settings
* lisp/treesit.el (treesit--things-around)
(treesit--navigate-thing)
(treesit-thing-at-point): Update docstring.
* src/treesit.c (treesit_traverse_validate_predicate): Refer to
treesit-thing-settings.
(syms_of_treesit): Add Vtreesit_thing_settings.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/treesit.el | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/treesit.el b/lisp/treesit.el index cb94d7feb94..b03ab0484a8 100644 --- a/lisp/treesit.el +++ b/lisp/treesit.el @@ -248,7 +248,7 @@ type as it. If no such parent exists, return nil. If PRED is non-nil, match each parent's type with PRED rather than using NODE's type. PRED can also be a predicate function, -and more. See `treesit-things-definition' for detail. +and more. See `treesit-thing-settings' for detail. If INCLUDE-NODE is non-nil, return NODE if it satisfies PRED." (let ((pred (or pred (rx-to-string @@ -2062,7 +2062,7 @@ parent thing surrounding POS. All of three could be nil if no sound things exists. PRED can be a regexp, a predicate function, and more. See -`treesit-things-definition' for details." +`treesit-thing-settings' for details." (let* ((node (treesit-node-at pos)) (result (list nil nil nil))) ;; 1. Find previous and next sibling defuns. @@ -2152,7 +2152,7 @@ position it would move to. If there aren't enough things to move across, return nil. PRED can be a regexp, a predicate function, and more. See -`treesit-things-definition' for detail. +`treesit-thing-settings' for details. TACTIC determines how does this function move between things. It can be `nested', `top-level', `restricted', or nil. `nested' @@ -2245,8 +2245,8 @@ function is called recursively." "Return the thing node at point or nil if none is found. \"Thing\" is defined by PRED, which can be a regexp, a -predication function, and more, see `treesit-things-definition' -for detail. +predication function, and more, see `treesit-thing-settings' +for details. Return the top-level defun if TACTIC is `top-level', return the immediate parent thing if TACTIC is `nested'." |