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

fix: move has_fd check into a function to reduce startup time #390

Merged
merged 3 commits into from
Jun 9, 2024

Conversation

scanhex
Copy link
Contributor

@scanhex scanhex commented May 20, 2024

vim.fn.executable "fd" takes up to one second, at least on WSL 2 + NixOS setup I'm using. In this PR I'm moving the invocation into a lazy function so that when the plugin is loaded at startup the user wouldn't incur this cost right away.

@jamestrew
Copy link
Collaborator

Sorry for the delay.
Strange that vim.fn.executable takes that long but turning this check lazy and caching is not a bad idea.

Thanks!

@jamestrew jamestrew merged commit a7ab9a9 into nvim-telescope:master Jun 9, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants