drym-org / symex.el

An intuitive way to edit Lisp symbolic expressions ("symexes") structurally in Emacs
Other
271 stars 22 forks source link

symex-wrap puts cusrsor in wrong place after wrapping. #101

Closed tommy-mor closed 1 year ago

tommy-mor commented 1 year ago

this form

(def |i|tems {1 "item a"
            2 "item b"
            3 "item c"})

(cursor is selecting the i in items in symex-normal evil mode). After symex-wrap ->

(||def (items) {1 "item a"
                2 "item b"
                3 "item c"})

items is correctly wrapped, and i'm in insert evil mode as I should be, but cursor is in wrong place. cursor should be (||items)

Anyone else reproduce?

tommy-mor commented 1 year ago

Just tried it in a elisp buffer and it worked as expected. But still fails in a clojure buffer.

I think because clojure has tree-sitter minor mode, and elisp doesn't.

tommy-mor commented 1 year ago

I guess this is because the wrap command is not yet implemented in symex-transformations-ts.el ? but then it falls back on non-tree sitter version. Not sure what's going on