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

Bug on reformatting code, fails to add a trailing command if the last element contains a comma. #1233

Open
EvanCarroll opened this issue Aug 21, 2021 · 0 comments

Comments

@EvanCarroll
Copy link

EvanCarroll commented Aug 21, 2021

This code seems to bug out when reformatting with EITHER rls or rust-analyzer, for this reason I think it's a problem with the communication protocol and the way vim reflows it,

This will add a , before the ,D on EACH save.

fn main() -> () {
        let _same = vec![
                "REALLLLL LONG LINE SO IT CAN NOT SHRINK",
                "1.0.0+21AF26D3—-117B344092B,D"
        ];
}

This will remove the terminating " quotes..

fn main() -> () {
        let _same = vec![
                "1.0.0+21AF26D3—-117B344092B,D"
        ];
}

tested again

  • rust-analyzer 5664a2b 2021-08-20 dev
  • rls 1.41.0 (517e9d6 2021-06-07)
@EvanCarroll EvanCarroll changed the title Bug on reformatting code Bug on reformatting code, fails to add a trailing command if the last element contains a comma. Aug 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant