Writing a file is very slow when lsp is processing #7427
-
Trying helix again on a rust project here, it looks like writes (as triggered by So I often get to wait 20ish seconds while the file isn't written, as the said project takes horribly long to build (future hell?). I couldn't get any log despite running with
Ultimately the problem is that the lsp takes that long; rust-analyser is a resource hog (memory is a problem as well when opening multiple helix instances... See #6533 where I asked if it'd be possible to not start it until first edit or something, but I guess just using another editor for viewing works well enough for now); it's just slow to get status back everytime I modify something, and not being able to write files timely makes it work. I'm not sure how it works internally but perhaps file write could have priority? at least :q refuses to quit while waiting for the save. FTR, hx --version Thanks for helix anyway! There are some nice ideas in here. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It can take a while to write if the language server is slow because the write waits on the document formatting response from the server. You can use # ~/.config/helix/languages.toml or <project dir>/.helix/languages.toml
[[language]]
name = "rust"
auto-format = false |
Beta Was this translation helpful? Give feedback.
It can take a while to write if the language server is slow because the write waits on the document formatting response from the server. You can use
:toggle-option auto-format
to disable auto-formatting or disable it specifically for Rust: