You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using multiple LSPs, sometimes Helix does not send textDocument/didSave notifications to some LSPs. Other similar notifications, such as didOpen, didClose and didChange seem to be sent.
This is problematic with LSPs that only compile code and provide diagnostics on save (for example metals, LSP for Scala). One has to always manually trigger recompilation to get up-to-date diagnostics from metals after a modification. In practice I have to trigger compilation manually after every save 😳
I think this problem has only started during this spring, it's possibly connected to the event system that was added recently?
Reproduction Steps
I wasn't able to reproduce the issue deterministically. However, when using Helix normally this happens tens of times per day. It might be related to using metals for autoformatting, but I wasn't able to confirm this suspicion.
I expected this to happen/Instead, this happened:
Helix should send didSave notification to all LSPs, but it doesn't. The log below demonstrates that didSave is only sent to scls and not metals.
This is most likely unrelated to the event system - document save notifications haven't been migrated to use events yet. The part of Document::save_impl that handles didSave hasn't been modified since #2507 actually so this is more likely a relatively old bug.
Hey, thanks for the quick response again! 🙏 I used helix built from the branch for a full work day and it seems to fix the issue completely! Could these changes be merged to master anytime soon ?
Summary
When using multiple LSPs, sometimes Helix does not send
textDocument/didSave
notifications to some LSPs. Other similar notifications, such asdidOpen
,didClose
anddidChange
seem to be sent.This is problematic with LSPs that only compile code and provide diagnostics on save (for example metals, LSP for Scala). One has to always manually trigger recompilation to get up-to-date diagnostics from metals after a modification. In practice I have to trigger compilation manually after every save 😳
I think this problem has only started during this spring, it's possibly connected to the event system that was added recently?
Reproduction Steps
I wasn't able to reproduce the issue deterministically. However, when using Helix normally this happens tens of times per day. It might be related to using metals for autoformatting, but I wasn't able to confirm this suspicion.
I expected this to happen/Instead, this happened:
Helix should send
didSave
notification to all LSPs, but it doesn't. The log below demonstrates that didSave is only sent toscls
and notmetals
.Here is relevant part of my
languages.toml
:Helix log
~/.cache/helix/helix.log
Platform
macOS
Terminal Emulator
wezterm 20240203-110809-5046fc22
Installation Method
flake
Helix Version
Helix 24.03 (bb0bfa2)
The text was updated successfully, but these errors were encountered: