e07e88d81d
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
14 lines
550 B
EmacsLisp
14 lines
550 B
EmacsLisp
(tree-sitter-load
|
|
'python
|
|
(format "%s/bin/python"
|
|
(getenv "TREE_SITTER_GRAMMAR_DIR")))
|
|
|
|
(setq tree-sitter-major-mode-language-alist
|
|
'((python-mode . python)))
|
|
|
|
|
|
(define-key evil-normal-state-map (kbd "C-.") #'tree-sitter-move-reset)
|
|
(define-key evil-normal-state-map (kbd "C-<right>") #'tree-sitter-move-right)
|
|
(define-key evil-normal-state-map (kbd "C-<left>") #'tree-sitter-move-left)
|
|
(define-key evil-normal-state-map (kbd "C-<up>") 'tree-sitter-move-up)
|
|
(define-key evil-normal-state-map (kbd "C-<down>") 'tree-sitter-move-down)
|