mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 03:48:18 +00:00

Problem: In cases when the (in-process) LSP server responds to the request immediately and calls `notify_reply_callback` the request will still be marked as pending, because the code assumes that the response will occur asynchronously. Then the request will be pending forever, because it was already set as "completed" before we even set it as "pending". A workaround is to wrap `notify_replay_callback` in `vim.shedule` ([like so](https://github.com/neovim/neovim/pull/24338#issuecomment-2809568617)] but that seems counterintuitive. Solution: Handle this case in Client:request().