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

How to set throttle/debounce time for search? #953

Open
TisnKu opened this issue Sep 14, 2022 · 6 comments
Open

How to set throttle/debounce time for search? #953

TisnKu opened this issue Sep 14, 2022 · 6 comments

Comments

@TisnKu
Copy link

TisnKu commented Sep 14, 2022

Hi there, thanks for the amazing plugin.
I am working on a huge project, before finishing typing, temp result will continue to show up, which is slow and not useful. Even when I finish typing, it is still updating previous temp result. Debounce the search in this case would improve performance. I did some search and didn't find the related config. Is there an existing config option to do it? Or could you add the feature?

@Yggdroot
Copy link
Owner

Just wait until the indexing is finished. Then the files list will be cached in a file.
Make sure g:Lf_UseCache is 1.
Make sure the C extension is installed.

@TisnKu
Copy link
Author

TisnKu commented Sep 15, 2022

I added let g:Lf_UseCache = 1, but still the same. Typing can also be freezed by search result half way like the following. I have to kill the terminal window.
image

@TisnKu
Copy link
Author

TisnKu commented Sep 15, 2022

Seems like there are 2 issues:

  1. Temp result freezes input.
  2. When result is too big, for example, a huge one line json file is in result, the whole vim is dead.

@Yggdroot
Copy link
Owner

Please refer to #318.

@TisnKu
Copy link
Author

TisnKu commented Sep 15, 2022

Thanks. The freezing problem fixed after specifying max-column. Would be even better to have the debounce time setting, since my project is really large and typing half way can slowly show a lot of temp result.

@Yggdroot
Copy link
Owner

There is no way.

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

No branches or pull requests

2 participants