snacks.nvim/lua/snacks/picker/source
Folke Lemaitre c9ccbe5617
fix(picker): fix race condition causing "Finder yielded after done" error. Closes #2327
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>
2025-10-24 07:25:22 +02:00
..
lsp fix(picker): fix race condition causing "Finder yielded after done" error. Closes #2327 2025-10-24 07:25:22 +02:00
buffers.lua fix(picker.buffers): add a flag when buffer is visible in a window. See #1417 2025-02-25 14:29:37 +01:00
diagnostics.lua feat(compat): added svim, a compatibility layer for Neovim. Closes #1321 2025-02-20 06:59:44 +01:00
explorer.lua feat(picker.scratch): add scratch picker with grep, new and delete keybinds (#1019) 2025-10-23 10:53:02 +02:00
files.lua feat(compat): added svim, a compatibility layer for Neovim. Closes #1321 2025-02-20 06:59:44 +01:00
git.lua feat(picker.git_diff): add base option to show diff against a merge base. Useful to see changes on a branch/PR 2025-10-23 09:25:56 +02:00
grep.lua perf(grep): move match parsing to resolve and fix an issue with .* results. Closes #2308 2025-10-21 22:32:44 +02:00
help.lua refactor(picker.help): simplified help picker 2025-10-22 14:33:16 +02:00
icons.lua fix(picker.icons): opts.icons -> opts.icon_sources. Fixes #715 2025-01-23 13:12:56 +01:00
lazy.lua feat(picker.lazy): don't use grep. Parse spec files manually. Closes #972 2025-02-07 07:16:32 +01:00
lines.lua fix(picker.lines): use original buf instead of current (which can be the picker on refresh) 2025-02-08 17:21:04 +01:00
meta.lua ci: auto generate picker function types 2025-02-05 07:44:26 +01:00
proc.lua refactor(compat): use svim.islist 2025-02-20 07:00:05 +01:00
qf.lua fix(picker.qflist): error with qflist picker when the list contains invalid items (#2293) 2025-10-20 20:09:08 +02:00
recent.lua fix(picker.recent): include closed / unlisted buffers in recent. Closes #1745 2025-10-20 18:42:26 +02:00
scratch.lua feat(picker.scratch): add scratch picker with grep, new and delete keybinds (#1019) 2025-10-23 10:53:02 +02:00
snacks.lua fix(picker): show new notifications on top 2025-01-30 17:56:14 +01:00
system.lua ci: auto generate picker function types 2025-02-05 07:44:26 +01:00
treesitter.lua feat(treesitter): add tree boolean to toggle on/off tree symbols (#1105) 2025-02-12 13:18:37 +01:00
vim.lua feat(picker): added Snacks.picker.tags() a picker for ctags. Closes #1728 2025-10-22 14:44:02 +02:00