mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
The old code had a race condition where: 1. R:request() scheduled LSP request setup but immediately suspended 2. R:wait() checked #self.requests (still 0) and returned immediately 3. Finder completed and set running = false 4. Then scheduled function ran and LSP responses came back 5. Callbacks tried to yield items but finder was already done → error The fix uses a pending counter to track when the scheduled setup function is running, ensuring we wait for both the setup to complete AND all LSP responses before the finder completes. Also improved error handling by checking the err parameter in callbacks. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| snacks | ||
| trouble/sources | ||