Closed uqix closed 6 months ago
So I tried replicate this with the steps you wrote but I was't able to for some reason.
Some ideas come to mind to track down this problem:
(defun yaml-pro-ts-up-level ()
"Move the point to the parent tree."
(interactive)
(let* ((at-node (treesit-node-at (point))) ;; Should get a valid node back
(tree-top (yaml-pro-ts--until-mapping-or-list at-node)) ;; should be non-nil
(parent-tree-top (and tree-top (yaml-pro-ts--until-mapping-or-list tree-top)))) ;; should be non-nil
(when parent-tree-top
(goto-char (treesit-node-start parent-tree-top)))))
are those let values returning things non-nil elements?
How about adding this config:
(advice-remove 'bash-ts-mode #'sh--redirect-bash-ts-mode)
(add-to-list 'major-mode-remap-alist '(sh-mode . bash-ts-mode))
shopt
should have builtin face in bash-ts-mode
, yaml-pro
works perfectly with sh-mode
.
I see the issue now. It turns out the (treesit commands were getting the other parse-trees when the existed. I just merged a fix so that only the 'yaml treesitter tree is used. Definitely let me know if you have further problems!
(let* ((at-tree (yaml-pro-ts--until-mapping-or-list (treesit-node-at (point) 'ymal))))
Pls fix this typo: ymal -> yaml.
ah, good catch, sorry about that. Should be fixed now.
Awesome, thank you.
To reproduce:
Configure:
Open test.yaml:
Call
yaml-pro-ts-kill-subtree
on any key, nothing happens, other subtree jump commands don't work neither.Have no idea the problem is from yaml-pro or polymode, some help appreciated, thanks.