"Extract into Function" removes whitespace #13874
Labels
A-assists
C-bug
Category: bug
S-actionable
Someone could pick this issue up and work on it right now
rust-analyzer version:
rust-analyzer 1.67.0-nightly (83356b7 2022-11-17)
rustc version:
rustc 1.67.0-nightly (83356b78c 2022-11-17)
relevant settings: nothing out of the ordinary, I think, but I'm using this in Helix
Expected behavior: using the
Extract into Function
action extracts the highlighted code into a function exactly without changing whitespace/newlines.Behavior: it removes newlines.
I think it does make sense to auto-format the code because it'll format on save anyways (hopefully), but it is kind of weird for the newlines to disappear because then I have to go back and insert all the newlines again ... I'd imagine that's tricky to implement though (I don't know about rust-analyzer's internals but I'd imagine this action operates on the AST more than text).
The text was updated successfully, but these errors were encountered: