Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<space>A auto action performing incorrectly #9874

Closed
dogunbound opened this issue Mar 14, 2024 · 3 comments
Closed

<space>A auto action performing incorrectly #9874

dogunbound opened this issue Mar 14, 2024 · 3 comments
Labels
A-language-server Area: Language server client C-bug Category: This is a bug upstream

Comments

@dogunbound
Copy link

dogunbound commented Mar 14, 2024

Summary

A auto action removing unnecessary parenthesis on each value in triple tuple function return causes weird behavior like removing the wrong text etc...

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() {}
  1. hx main.rs
  2. Ensure you get warnings to remove unnecessary parenthesis around type
  3. Go to the parenthesis and press space-a
  4. The first one should remove correctly and well
  5. DO NOT WRITE TO THE FILE
  6. Then move to the next parenthesis
  7. 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:

2024-03-14.09-59-51.mp4

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

@dogunbound dogunbound added the C-bug Category: This is a bug label Mar 14, 2024
@kirawi kirawi added the A-language-server Area: Language server client label Mar 15, 2024
@the-mikedavis
Copy link
Member

Is this reproducible in another editor? I suspect that this is a rust-analyzer bug

@kirawi kirawi added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Mar 29, 2024
@dogunbound
Copy link
Author

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.

2024-04-01.21-59-23.mp4

@the-mikedavis
Copy link
Member

This can be reported upstream instead

@the-mikedavis the-mikedavis closed this as not planned Won't fix, can't repro, duplicate, stale Apr 2, 2024
@the-mikedavis the-mikedavis added upstream and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-server Area: Language server client C-bug Category: This is a bug upstream
Projects
None yet
Development

No branches or pull requests

3 participants