Help setting up rust-analyzer with kak-lsp

He anyone successfully set up kak-lsp with rust-analyzer that can share their config? I’ve tried a couple times but haven’t been successful.

Is there a reason you can’t use RLS? The instructions in the wiki work fairly well for it.

I have used rust-analyzer a while ago, but although RA supports all manner of fancy IDE operations it falls down a bit on errors and warnings - unlike RLS, it doesn’t integrate Clippy (or rustfmt), and I don’t think it displays errors and warnings without invoking the compiler. Since inline errors and warnings are the most important to me, I went back to RLS.

1 Like

I’m not seeing RLS referenced on the wiki, only racer. I haven’t used racer in years, and I thought it was a separate project from RLS. Have they merged into the same thing?

The reason you’re not seeing RLS mentioned in the wiki is because you seem to be looking at the wrong one. Kak-lsp’s wiki mentions instructions on how to use various language servers, including RLS, here.

3 Likes

ah my mistake, thank you!

I don’t think clippy and rustfmt should be handled by LSP - it’s much easier to run them as separate programs in my opinion.

@EpocSquadron : I’ve been using kak-lsp and rust-analyser without problems for quite some time now. You can find the relevant bits in my dotfiles repo:

You’ll also find my config to have rustfmt run automatically after each save

1 Like