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

previewers.file_maker freezes neovim for slow responding mounts #3388

Open
FelipeLema opened this issue Dec 17, 2024 · 0 comments
Open

previewers.file_maker freezes neovim for slow responding mounts #3388

FelipeLema opened this issue Dec 17, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@FelipeLema
Copy link

Description

say I have a network-mount in /home/myuser/my-far-away-stuff that, to keep it simple, it's actually located in the moon so the ping is real high

when I move selection on one of those files, neovim becomes unresponsive until the previewer times out

while I could change the timeout, the thing is that it doesn't have to timeout. The freezing comes from the capture("file --mime-type -b ...") call that waits for that command output (and that command freezes until it can read bytes from the file).

the fix should be fairly easy by replacing capture() with something async (probably using vim.uv)

Neovim version

NVIM v0.10.2
Build type: Release
LuaJIT 2.1.1713484068
Run "nvim -V1 -v" for more info

Operating system and version

debian 12

Telescope version / branch / rev

a0bbec2

checkhealth telescope

==============================================================================
telescope: require("telescope.health").check()

Checking for required plugins ~
- OK plenary installed.
- OK nvim-treesitter installed.

Checking external dependencies ~
- OK rg: found ripgrep 13.0.0
- OK fd: found fdfind 8.6.0

===== Installed extensions ===== ~

Telescope Extension: `frecency` ~
- OK nvim-web-devicons installed.
- OK ripgrep installed.

Telescope Extension: `fzf` ~
- OK lib working as expected
- OK file_sorter correctly configured
- OK generic_sorter correctly configured

Steps to reproduce

  1. have a directory with slow access
  2. Telescope find_files on that directory
  3. Move around any of those files
  4. neovim becomes unresponsive until preview times out

Expected behavior

  • neovim doesn't freeze while waiting for previewer (I can still use UI to, for example, finish writing input for telescope)
  • previewer shows "is loading" message? not necessary but I just realized a blank preview may lack a message to tell it apart from "timed out" or "nothing in it"

Actual behavior

neovim freezes until timeout. any keypresses while it's frozen are queued and after timeout they're unqueued

Minimal config

-- any current Telescope setup
@FelipeLema FelipeLema added the bug Something isn't working label Dec 17, 2024
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