-
-
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
Timeout waiting for LSP after quitting and garbage output for all toml files since 22.12 #5174
Comments
This is a known issue #4468 (comment) and an upstream problem |
The garbage output are the escape codes for mouse events send by the emulator that are not intercepted by helix anymore. Once helix properly shuts down we stop requesting mouse events from the emulator. Not sure if we can do anything about that... Maybe we can execute some of the shutdown code earlier? |
Ah, I skimmed that and somehow missed the last bullet point for taplo. The delay is noticeably worse in the 22.12 than 22.08, though. Do you have a link to the issue upstream, if it exists? And yeah, I see if I spin my mouse while it's hanging it absolutely fills the prompt with garbage. |
This issue did not exist in |
tamasfe/taplo#354 Micheal Davis actually has a pr to fix it |
I'm just disabling the LSP by adding the following to languages.toml until it's fixed upstream since the delay is a nuisance:
|
Can we have another |
This is a tricky case to deal with genically with a change in Helix. It's in your best interest to shut down language servers gracefully: a hypothetical language server could be building some database for a project and a hard kill might cause some corruption or lost work. If you're building from source you can tune this timeout down: helix/helix-view/src/editor.rs Line 1366 in ba3c24a
It's currently 3s which makes the shutdown take a while. We could set a timeout lower as a special case for |
Would it be possible to give some immediate feedback to the user that the editor is quitting, a status line "Shutting down language servers..." or something? |
This seems to be fixed in Taplo 0.8.1 now that this PR has been merged. |
Summary
Since the update, any toml file will hang after quitting, then output
Error: Timed out waiting for language servers to shutdown
. Doesn't seem to happen for other formats.Also, sometimes after quitting the next shell prompt will be pre-filled with a bunch of escape sequence garbage like:
35;93;71M35;109;71M35;119;71M35;129;71M35;139;71M35;148;72M35;155;73M
. The exact garbage changes. I can't remember if this bug was introduced in 22.12 or not.Both tested on two machines with both zsh (customized) and bash (distro default) and two terminal emulators.
Reproduction Steps
helix qwe.toml
:q
or:q!
. No changes need to be made.UI will freeze for a second or two, then print the error. Trying this repeatedly will eventually lead to the garbage output, but it can take a lot of attempts (>50).
Helix log
helix -vvv qwe.toml
logThis is with both garbage in prompt and hang.
~/.cache/helix/helix.log
Platform
Arch Linux
Terminal Emulator
Konsole and Alacritty
Helix Version
helix 22.12
The text was updated successfully, but these errors were encountered: