Weird neovim / rust setup

In /home/me/foo/ , we have the root of a Rust project.

I'm wondering if there is a way to:

terminal 1:
/home/me/foo $ vim -start-server-mode 'rust'
some other terminal
vim --client 'rust'

then in the other terminal, it connects to the "server in /home/me/foo" [this means not reloading the existing running rust-analyzer].

This is a setup where:

  1. anytime to restart rust-analyzer, I go to terminal 1 and restart

  2. in other places, I can connect to the existing running server via vim --client 'rust'

edit: by vim, I actually mean neovim

Does anyone have a setup like this? If so, can you share your neovim config files ?

Thanks!

it's not exactly what you described, but you can check ra-multiplex, which you should use as a replace for rust-analyzer in your editor config: