helix
helix copied to clipboard
<space>A auto action performing incorrectly
Summary
If you do a write between each removal of parenthesis it works as expected. Seems like the lsp doesn't react to the file being modified live. It only reacts on a read.
Reproduction Steps
Repro steps. Make your main file in a rust project look like this:
fn helix_bug() -> ((i32), (i32), (i32)) {
todo!()
}
fn main() {}
-
hx main.rs
- Ensure you get warnings to remove unnecessary parenthesis around type
- Go to the parenthesis and press space-a
- The first one should remove correctly and well
- DO NOT WRITE TO THE FILE
- Then move to the next parenthesis
- Try and remove it with space-a as well
I expected this to happen: It removes the parenthesis correctly.
Instead, this happened: It will bug out and remove the wrong text
Video demonstration:
https://github.com/helix-editor/helix/assets/64436119/27dfa20e-b100-407f-b644-65bb9ebec2f0
Helix log
https://www.dropbox.com/scl/fi/7y54mt1so3vcysorm5xzt/helix.log?rlkey=pv8jnwbi9ewhy15hxr8poaerg&dl=0
Platform
Linux archlinux 6.7.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 08 Mar 2024 01:59:01 +0000 x86_64 GNU/Linux
Terminal Emulator
konsole 24.02.0
Installation Method
pacman
Helix Version
helix 23.10
Is this reproducible in another editor? I suspect that this is a rust-analyzer bug
Is this reproducible in another editor? I suspect that this is a rust-analyzer bug
Sorry for the long reply. I kinda forgot about this bug. Yeah it happens in vscode.
https://github.com/helix-editor/helix/assets/64436119/31516f7b-c28f-4f38-aa1c-e22c3aa861d4
This can be reported upstream instead