Commit graph

4 commits

Author SHA1 Message Date
Profpatsch
fdb47be7d7 feat(emacs-tree-sitter-move): load more than one tree sitter grammar
Change-Id: I43b8ddb180c056f1b8c650ccc915ec41bae83960
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2262
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2021-01-01 22:40:38 +00:00
Profpatsch
e07e88d81d feat(emacs-tree-sitter-move): left and up movements, skip unnamed
We skip intermediate nodes that do not have any siblings, because they
are irrelevant to navigation and just add extra keypresses without any
highlight changes. This might not be the best choice, we’ll see.

Change-Id: I75fbf79aa7915172e426442a076d57cfbebf5421
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2260
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2021-01-01 22:40:38 +00:00
Profpatsch
9da760fba4 feat(emacs-tree-sitter-move): Add tree-sitter-move-reset
Resets the cursor to the named node under the cursor.
`-right` does not do it anymore, so it’s possible to navigate on
higher levels of the tree instead of always resetting to a leaf.

Change-Id: Id330854c72ea24da0cc8611f30f5617e0f127c1b
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2259
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2021-01-01 22:39:28 +00:00
Profpatsch
806c281b34 feat(users/Profpatsch): moving around via the tree-sitter parse tree
Has a little setup to get the cursor position and map it onto a tree
sitter node. The current node is saved in a cursor variable, and a
highlight overlay marks the range of the current node in the buffer.

Change-Id: I0af56115f928732e993fbefe978a246ca7c757ee
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2258
Reviewed-by: lukegb <lukegb@tvl.fyi>
Reviewed-by: tazjin <mail@tazj.in>
Reviewed-by: Profpatsch <mail@profpatsch.de>
Tested-by: BuildkiteCI
2021-01-01 19:03:30 +00:00