Rust-analyzer times out when a large buffer is open.
See original GitHub issueWhat’s the output of :CocInfo
vim version: VIM - Vi IMproved 8.1 8012269
node version: v12.22.7
coc.nvim version: 0.0.80-cf98cf301f
coc.nvim directory: /home/jakew/.vim/bundle/coc.nvim
term: dumb
platform: linux
## Log of coc.nvim
2021-11-18T09:30:01.389 INFO (pid:1544) [plugin] - coc.nvim 0.0.80-cf98cf301f initialized with node: v12.22.7 after 43ms
2021-11-18T09:30:03.860 INFO (pid:1544) [services] - registered service "rust-analyzer"
2021-11-18T09:30:03.860 INFO (pid:1544) [services] - Rust Analyzer Language Server state change: stopped => starting
2021-11-18T09:30:03.889 INFO (pid:1544) [language-client-index] - Language server "rust-analyzer" started with 1567
2021-11-18T09:30:03.896 INFO (pid:1544) [services] - Rust Analyzer Language Server state change: starting => running
2021-11-18T09:30:03.902 INFO (pid:1544) [services] - service rust-analyzer started
2021-11-18T09:30:17.879 INFO (pid:1544) [completion-complete] - Results from: around,rust-analyzer
2021-11-18T09:33:02.607 INFO (pid:1544) [completion-complete] - Results from: around,buffer
2021-11-18T09:33:54.483 INFO (pid:1544) [attach] - receive notification: runCommand [ 'rust-analyzer.serverVersion' ]
2021-11-18T09:35:00.418 INFO (pid:1544) [attach] - receive notification: showInfo []
2021-11-18T09:37:07.566 INFO (pid:1544) [completion-complete] - Results from: around,buffer
2021-11-18T09:37:59.867 INFO (pid:1544) [attach] - receive notification: showInfo []
What’s the output of :CocCommand rust-analyzer.serverVersion
[coc.nvim] rust-analyzer 73668334f 2021-11-15 stable
My tests have some large files that they open (about 80k line csv). When I:
- Open lib.rs in my rust project into a buffer.
- Open tests/input/large.csv into another buffer.
- Make a change to lib.rs.
- Save the change.
Vim will hang for a while and then give the message: “rust-analyzer timeout after 5000ms”.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Allow to buffer more input messages · Issue #2879 · rust-lang ...
I just observe rust-analyzer running with like 100%+ cpu usage and my Emacs freezes. Ctrl + g works for a moment and it...
Read more >User Manual - rust-analyzer
At its core, rust-analyzer is a library for semantic analysis of Rust code as it changes over time. This manual focuses on a...
Read more >Neovim rust analyzer issue. : r/rust - Reddit
nvim is trying to use it. :LspInfo. And see if you have the rust_analyzer attached. Detected filetype: rust 1 client(s) attached to this...
Read more >Rust-analyzer doesn't check the buffer on typing, but only on ...
No, it's because your system would likely grind to a halt if you did this and also opened a large rust project. Analyzing...
Read more >Proc macro support in rust-analyzer for nightly rustc versions
And that's not a good answer? Not really, no. At that point, the asker is usually nervously looking at the time, and they...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I figured out that if I tell coc-list to ignore buffers this problem goes away. I did that by using the
:CocConfig
command and putting this in my settings file:I figured out the source of the problem. I believe it is the
set hidden
setting that is triggering this for some reason. Here is a minimal vimrc that I used in order to recreate the behavior:If I remove
set hidden
then everything works fine. Any idea why this might be?