Drag sexp forward/backward works unexpectedly when ignore forms are adjacent to form the command is called on
Case 1
#_hello
(:hello world)|
Drag sexp backwards
#_(:hello world)
hello
The same seems to happen in reverse with the above case (using drag sexp forwards with (:hello world) at the top).
Case 2
#_{:clj-kondo/ignore [:unresolved-symbol]}
(:hello world)|
Drag sexp backwards
(:hello world){:clj-kondo/ignore [:unresolved-symbol]}
#_
Case 3
(:hello world)
#_{:clj-kondo/ignore [:unresolved-symbol]}|
Drag sexp backwards
(:hello world)
{:clj-kondo/ignore [:unresolved-symbol]}#_
I was thinking that maybe it's hard to treat the #_ as part of the form it follows, since you can also use many #_s before a single form to ignore many. Case 1 acts as though #_ is its own form, which could make sense given what was just mentioned, but case 2 and 3 are still odd.
Thanks! Looks weird indeed, and is tricky indeed. Essentially I have been thinking about it like you do there: as if #_ is its own form. So Case 1 is expected, even if maybe not optimal.
- Related discussion: https://github.com/BetterThanTomorrow/calva/discussions/2125
Case 3 is fine if #_ is considered its own form, isn't it?
Ah, you're right! I didn't realize that before.