-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
textDocument/formatting takes much longer than cargo fmt #1726
Comments
That seems pretty strage. For document formatting, we just shell out to rustfmt, so my best guess is that something weird is going on in the environment. I don't have a better advice than to just try to debug this issue. |
How do I go about debugging this? |
I noticed the same behavior in RLS: on some projects formatting via the request just takes a while for some reason. Maybe it's the language client that is to blame here. |
I also get this when the lsp server has just been started and still has high CPU usage. After a while it settles though and becomes instant |
Maybe it's queued in the event loop? |
Let's close this as a dupe of #4054 (which is newer, but has more discussion and an arguably better title). |
I'm using
rust-analyzer
cd24349 with autozimu/LanguageClient-neovim@12e65e7.Running
:call LanguageClient_textDocument_formatting()
takes a really long while (upwards of 30 seconds on files from rav1e, likesrc/api/mod.rs
), even thoughcargo fmt
completes in half a second.The text was updated successfully, but these errors were encountered: