autozimu / LanguageClient-neovim

Language Server Protocol (LSP) support for vim and neovim.
MIT License
3.55k stars 273 forks source link

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

Open EvanCarroll opened 3 years ago

EvanCarroll commented 3 years ago

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