Skip to content

Conversation

@doorgan
Copy link
Contributor

@doorgan doorgan commented Jan 19, 2026

Fixes a race condition issue found while debugging elixir-lang/expert#245

In some editors(I can realiably reproduce on neovim) the client will send textDocument/didOpen and immediately after textDocument/didClose which causes a lot of issues with Expert's Document store, and it's not trivial to fix there.

Both Lexical and ElixirLS handle the specific notifications in this PR synchronously to ensure they are handled in order, per the spec.

This PR fixes that by handling lifecycle notifications synchronously. I also made the sync notifications configurable in case users have different requirements. I don't personally see which or how, but it wasn't hard to add.

@mhanberg mhanberg merged commit 7f6e159 into elixir-tools:main Jan 19, 2026
8 checks passed
@doorgan doorgan deleted the doorgan/sync_notifications branch January 19, 2026 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants