Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: When doing a non-live grep, the picker window opens only after first match is found #1507

Open
4 tasks done
dapetcu21 opened this issue Mar 5, 2025 · 0 comments
Open
4 tasks done
Labels
bug Something isn't working

Comments

@dapetcu21
Copy link

dapetcu21 commented Mar 5, 2025

Did you check docs and existing issues?

  • I have read all the snacks.nvim docs
  • I have updated the plugin to the latest version before submitting this issue
  • I have searched the existing issues of snacks.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

0.10.2

Operating system/version

Windows 11, Mac OS 15.0.1

Describe the bug

When doing a non-live grep, the picker window opens only after first match is found, which is confusing and makes cancelling the search impossible. show_empty makes no difference. Live greps don't suffer from this issue.

Steps To Reproduce

  1. Have a large codebase, ideally on a slow disk or not recently accessed
  2. lua Snacks.picker.grep({ search = "foo", live = false })
  3. Notice that opening the picker window is slow and when it opens it always has at least one result

Expected Behavior

An empty picker window should open immediately after issuing the command and should be populated eventually when the first results come in from ripgrep.

Repro

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
  spec = {
    { "folke/snacks.nvim", opts = {} },
    -- add any other plugins here
  },
})
@dapetcu21 dapetcu21 added the bug Something isn't working label Mar 5, 2025
@dapetcu21 dapetcu21 changed the title bug: When doing a non-live grep on Windows, the picker window opens only after first match is found bug: When doing a non-live grep, the picker window opens only after first match is found Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant