about summary refs log tree commit diff
path: root/users/Profpatsch/emacs-tree-sitter-move/test.py
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2020-12-19T18·22+0100
committerProfpatsch <mail@profpatsch.de>2021-01-01T19·03+0000
commit806c281b3491b165d01be561f005dada24107363 (patch)
tree3cea1ceae3892dfa648a16c108aac1cfafcf4a07 /users/Profpatsch/emacs-tree-sitter-move/test.py
parentc9b985e7bc20c7dc90f14f47f8709864b05c032f (diff)
feat(users/Profpatsch): moving around via the tree-sitter parse tree r/2042
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
Diffstat (limited to 'users/Profpatsch/emacs-tree-sitter-move/test.py')
-rw-r--r--users/Profpatsch/emacs-tree-sitter-move/test.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/users/Profpatsch/emacs-tree-sitter-move/test.py b/users/Profpatsch/emacs-tree-sitter-move/test.py
new file mode 100644
index 0000000000..0f57bae035
--- /dev/null
+++ b/users/Profpatsch/emacs-tree-sitter-move/test.py
@@ -0,0 +1,13 @@
+(4 + 5 + 5)
+
+def foo(a, b, c)
+
+def bar(a, b):
+    4
+    4
+    4
+
+[1, 4, 5, 10]
+
+def foo():
+    pass