-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Terminal freezes every time try to quit editor when LSP is launching #2059
Comments
This is because we are trying to wait for the formatter, See also #1639 |
‘:q’ is not instant, it can be interrupted. also see #2570 In my opinion, waiting for the LS in general is not a good idea. If the language server hangs, formatting should be abandoned at the earliest opportunity. I don’t care about formatting 95% of the time, I just want to compile source code I’m editing, like, immediately. And if my language server can do some stuff, great, if it missed the opportunity, whatever. |
Maybe we should have a timeout here? Like if the LS didn't respond in 200ms, write the file anyway. |
Agreed, I'd accept a patch that implements this. Might be easier to do once #2267 is merged |
To add to this, |
Summary
Add this line to
~/.config/helix/config.toml
:Then edit any source file with LSP support enabled, you see language server's messages (e.g. "fetching...", "25%", "3/4" and a circle-like animation) shown on the left conner.
Once you see the messages (obviously it means your language server is starting), immediately type
:wq
and your terminal freezes until the language server is completely booted up.Try this on an old machine. It takes even longer for the language server to boot up and you can easily get a frozen terminal.
Reproduction Steps
See above.
Helix log
See #2003.
Platform
macOS, Termux
Terminal Emulator
iTerm2, Termux
Helix Version
helix 22.03 (d4e45fd)
The text was updated successfully, but these errors were encountered: