On Tue, Feb 02, 2021 at 04:53:40PM -0700, Aaron Bieber wrote:
Hello Aaron,
> Here is a port I was tricked into making!
>
> It lets editors do LSP kinda things with rust. Apparently this is the cool
> tool to use now, and RLS is.. not? (/me shakes his cane at the kids on the
> lawn)
>
> I haven't actually gotten this working in any of the editors I use.. so if
> anyone has more experience and can vouch for it - that would be awesome!
I've been using rust-analyzer on OpenBSD with neovim for a while *but* it
seems to put an immense load on the system. It's almost impossible to play
USB audio, for example, at the same time. I haven't investigated why this is
happening (e.g. maybe it's creating lots of threads; or keeping many files
open), but it's been bad enough that I semi-regularly have to shut neovim
down and reopen it to regain system performance. I don't know if I've done
something stupid, whether rust-analyzer is a beast everywhere, or whether
it's tickling OpenBSD performance issues that most other software doesn't.
For neovim, I've used a config roughly like the following:
Plug 'prabirshrestha/async.vim' " Needed for vim-lsp
Plug 'prabirshrestha/vim-lsp' " Language server protocol support
let rust_analyzer_bin=$HOME . "/.cargo/bin/rust-analyzer"
if executable(rust_analyzer_bin)
au User lsp_setup call lsp#register_server({
\ 'name': 'rust-analyzer',
\ 'cmd': [rust_analyzer_bin],
\ 'allowlist': ['rust'],
\ })
endif
There are probably other parts of the config that have some part to play in
it (vim/neovim config is "get it working and then try and forget the details"
for me), but if you are a neovim/vim user, that might help you play with it!
Laurie