feat(emacs-tree-sitter-move): add a simple down movement as well
Always goes to the first child for now. Change-Id: I1d00b2f2013ba7e5f88622d1de3c99500e5f1a7a Reviewed-on: https://cl.tvl.fyi/c/depot/+/2261 Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
This commit is contained in:
parent
e07e88d81d
commit
3279786cd2
1 changed files with 4 additions and 4 deletions
|
@ -94,10 +94,10 @@
|
|||
(interactive)
|
||||
(tree-sitter-move--move-skip-non-sibling-nodes 'tsc-get-parent))
|
||||
|
||||
;; TODO doesn’t work yet because sibling nodes are only skipped upwards
|
||||
;; (defun tree-sitter-move-down ()
|
||||
;; (interactive)
|
||||
;; (tree-sitter-move--move-skip-non-sibling-nodes (lambda (n) (tsc-get-nth-named-child n 0))))
|
||||
;; TODO: does not skip siblings yet, because the skip function only goes up (not down)
|
||||
(defun tree-sitter-move-down ()
|
||||
(interactive)
|
||||
(tree-sitter-move--move-if-possible (lambda (n) (tsc-get-nth-named-child n 0))))
|
||||
|
||||
(defun tree-sitter-move--move-skip-non-sibling-nodes (move-fn)
|
||||
"Moves to the sidewards next sibling. If the current node does not have siblings, go
|
||||
|
|
Loading…
Reference in a new issue