neoclide / coc-rls

Rust language server support for coc.nvim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does not format if there are errors

johnpyp opened this issue · comments

Unlike other coc language servers, it seems like coc-rls won't run rustfmt unless there are no errors present in your project, even though rustfmt works on code that won't compile.

Should be issue of rls, you can checkout output channel.

My guess is that it actually depends on the error. When the syntax is so much broken than parsing the code is impossible, there is no way for rustfmt to run, for it does not even understand the tree structure of your file. However, if the errors are just semantic but the syntax is correct, then it does run fine.

Should be limitation of rustfmt.