Closed Pxartist closed 4 months ago
My tests:
Cargo.lock
Cargo.toml
src/
src/main.rs
nvim src/main.ts
, rust-analyzer launches and works as expectedtabnew
to a new tabprintln!("{}", xyz);
, :w src/lib.rs
to new filexyz
cannot find in lib.rs, without reloadingI've watchman installed, you can try https://github.com/neoclide/coc.nvim/wiki/Install-coc.nvim#install-watchman-for-file-watching
I have followed the installation instructions for watchman and have added it to my PATH. It does not appear to work and the documentation for Windows based systems is rather lacking.
Is this issue upstream in regards to the rust-analyzer or is it with the implementation of it in this plugin? It appears that I am the first one with the desire for rust-analyzer to work with multiple tabs and windows as I have not found any similar issues online elsewhere.
I would also like to add that :CocRestart
also appears to have the same results as well, although I currently only have coc-rust-analyzer installed.
Still can't reproduce this on macOS, have no idea about this. It's properly issue of rust-analyzer. Can you reproduce this with VSCode + rust-analyzer?
Still can't reproduce this on macOS, have no idea about this. It's properly issue of rust-analyzer. Can you reproduce this with VSCode + rust-analyzer?
I have been able to replicate the issue using a default VSCode installation and rust-analyzer installation acquired from here: https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer. Any rust files opened after the very first one will no longer have error detection or code suggestion / completion.
What's the output of
:CocInfo
versions
vim version: NVIM v0.8.2 node version: v14.18.3 coc.nvim version: 0.0.82-b11a93ba 2022-12-25 15:19:13 +0800 coc.nvim directory: C:\Users\frede\AppData\Local\nvim-data\plugged\coc.nvim term: undefined platform: win32
Log of coc.nvim
2023-01-11T17:17:56.965 INFO (pid:18156) [plugin] - coc.nvim initialized with node: v14.18.3 after 121 2023-01-11T17:18:05.412 INFO (pid:18156) [attach] - receive notification: showInfo []
What's the output of
:CocCommand rust-analyzer.serverVersion
[coc.nvim] rust-analyzer 0.3.1348-standalone (643bc02de 2023-01-01)
What's your coc-rust-analyzer version? You can get it from
:CocList extensions
coc-rust-analyzer 0.71.1 ~\AppData\Local\coc\extensions\node_modules\coc-rust-analyzerISSUE
When opening new, additional rust files in windows and tabs in neovim after the very first Rust file, the Rust analyzer does not activate for the subsequent files. The only workaround I have found so far is to execute
:CocCommand rust-analyzer.reload
to get the later files to have Rust code analysis.For example: If I open an .rs file in neovim, it will have Rust analysis. If I open one or more .rs files in new windows or tabs within the same neovim instance, they will not have Rust code analysis unless I run
:CocCommand rust-analyzer.reload
I do not see any possible configuration settings in the README.md that can address this issue and would like to know if there are any other methods besides having to run
:CocCommand rust-analyzer.reload
for each new tab or window that I open.A new configuration setting that addresses this would be greatly appreciated.