Skip to content
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

File not saved until quit, which hangs for a while #2570

Closed
hazeycode opened this issue May 25, 2022 · 5 comments
Closed

File not saved until quit, which hangs for a while #2570

hazeycode opened this issue May 25, 2022 · 5 comments
Labels
C-bug Category: This is a bug

Comments

@hazeycode
Copy link
Contributor

hazeycode commented May 25, 2022

Summary

Fairly frequently, :w can fail with Async Error: request timed out, other times no message is observed.
The current file will not be written until the program is quit using :q where then the program hangs for a couple of minutes before finally writing the file and exiting.

Part of the problem appears to be that the language server I am using is failing. Helix does not deal with this situation gracefully.

Reproduction Steps

As described.

I would expect that language server errors are reported promptly to the user and that they interfere with file writing operations minimally.

Helix log

2022-05-25T15:10:47.749 helix_lsp::transport [ERROR] err: <- IO(Os { code: 32, kind: BrokenPipe, message: "Broken pipe" })
2022-05-25T15:11:07.750 helix_view::document [WARN] LSP formatting failed: request timed out
2022-05-25T15:11:07.750 helix_lsp::transport [ERROR] err: <- IO(Os { code: 32, kind: BrokenPipe, message: "Broken pipe" })
2022-05-25T15:11:08.252 helix_term::application [ERROR] Timed out waiting for language servers to shutdown

Platform

Linux

Terminal Emulator

kitty 0.23.1

Helix Version

helix 0.5.0

@hazeycode hazeycode added the C-bug Category: This is a bug label May 25, 2022
@lebakasable
Copy link

Can give me the file, the ls you are using and your config please 🙏🏻

@hazeycode
Copy link
Contributor Author

zls is the LS i'm using.

My config file, very simple:

theme = "gruvbox"

[editor]
line-number = "absolute"
auto-completion = true
true-color = true

As for a particular file, I've observed the issue with any .zig file.

@the-mikedavis
Copy link
Member

Similar but I think a different issue overall: #2059

It looks like the formatting callback is timing out because the language server crashed (hence the "broken pipe"). I'm not sure there's any handling of crashing language servers at the moment.

@Xaeroxe
Copy link
Contributor

Xaeroxe commented Oct 21, 2022

Reproducible with rust-analyzer language server too. Really breaks up the flow of using helix for dev work sadly.

@the-mikedavis
Copy link
Member

This was fixed in #4797

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

No branches or pull requests

4 participants