Hey, I'm using vim with coc-rust-analyzer and while it works pretty well the startup time is a pretty big problem. My workflow involves a lot of quitting/reopening vim which makes rust-analyze start from scratch every time. Is there any work in progress to get better starting time or caching ?
If you read the code for a while before invoking any rust-analyzer commands, https://github.com/rust-analyzer/rust-analyzer/pull/4133 (merged yesterday) will help a little. But there's no support for persisting the database.
Well it seems to re run cargo check every time. Is that expected ?
Yes by default, but it should be fast if there are no modifications.
There's no immediate work on this.
Althogh, I wonder if something can be done on the editor's side? One of the ideas behind LSP is that you have a persistent process.
The best workaround for now would be to keep vim running and use a file picker or
I used to keep vim open but my workflow was ^Z fix error, if fixed open new vim with next error else do fg. I ended up with stuff like https://gist.github.com/Eijebong/ce0d6848a4d5664baae4fd8c6b39a51a (I think that was when I updated bitflags in servo). I stopped doing that after setting up r-a because it ate my RAM.
I guess I could just start r-a manually and modify the extension to connect to it ?
(And yes my workflow is dumb, but muscle memory is strong...)
I don't think these necessary needs a change of workflow. Ideally, you have the same workflow, but the editor reuses servers
Time to learn typescript then :rofl:
Has something changed recently ? It stopped doing full
cargo check on startup !