Open ls-devs opened 1 year ago
I have the same issue using lazy
. The issue is that the plugin isn't loaded until the first rust file is opened, and at this point, for some reason, it doesn't auto-attach (you need to :LspStart
yourself.
A workaround for this is to remove your ft = { "rust" }
line so that it doesn't load lazily. It'll auto-attach properly then. But yeah, it's not ideal and I don't really understand why it behaves that way.
I had the same issue but found a workaround that I am currently using while still lazy loading rust-tools
:
Specify the event manually using event = { "BufReadPost *.rs" }
. I don't know why this works and ft = { "rust" }
does not, but at least it does work somehow. Hopefully it works for you aswell.
I had the same issue but found a workaround that I am currently using while still lazy loading
rust-tools
: Specify the event manually usingevent = { "BufReadPost *.rs" }
. I don't know why this works andft = { "rust" }
does not, but at least it does work somehow. Hopefully it works for you aswell.
Thank you this is working.
Yes, I can confirm this works. I guess the issue comes from either lazy
or rust-tools
. Pretty hard to diagnose.
I'll add another detail: for me, the issue isn't present when rust-analyzer
is installed through mason-lspconfig
. Only when I provide my own. Which seems to differ from the initial post here so I don't know what to think.
Hi, Rust-tools does not start automatically rust-analyser with the config in setup on my Linux laptop. To have rust-analyser and rust-tools working properly on my Linux I have to run
RustStartStandaloneServerForBuffer
I use lsp-zero & lazy.nvim
Here's lazy config :
Here's lsp-zero config :
Here's rust-tools config :
Do I miss some required executables on my Linux for rust-tools to work properly ?