-
Notifications
You must be signed in to change notification settings - Fork 942
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
Disabling telescope customization #37
Comments
Yes, there's currently an issue with overwriting an existing lazy keymap. Will fix this! |
Fixed in folke/lazy.nvim@74bc61a |
Thanks! The telescope search is using "Find Files" now as expected, but unfortunately it's still slow. Is there some kind of lazy loading happening for telescope that can be disabled? I reverted back to my old configuration without lazy and saw telescope results show up immediately even on first search, but with lazy it takes considerably longer, between 0.5-1 seconds or so. I also already have |
add event = "VimEnter" then i should load as soon nvim is started |
Thanks, I tried this, but it made no difference, the results in telescope are still loading slowly. |
Weird, it's very fast for me... Did you try adding fzf-native? |
This is my telescope spec in it's entirety;
|
i guess it is not related to lazyloading. if it would be too "lazy", the delay would be the drawing of the telescope window, not the results. |
I agree, it's very strange. My old telescope config is here, the major difference being the use of |
@altosys you added fzf native, but you don't use it, since you do So that's why it's slow. Removing that line might help |
I think that might have been it, but now when I start nvim I get this message every time:
How can I disable this message? Results will only appear in telescope after I press enter here, even if I manage to open the telescope prompt before the message comes up. If I wait for the message after starting nvim and press enter, then it seems that telescope is indeed as fast as it should be. |
Did you disable nvim-notify? |
you can disable those messages in lazy config. Check the lazy docs |
Yeah I did disable nvim-notify, it was bugging me a bit too much with messages I didn't really have a need for. I disabled the update messages by setting |
that message can't have anthing to do with telescope performance anyway. |
Even in my home directory with 115000 files, Telescope is instant |
Maybe I was unclear above, I've already commented out the sorter but the telescope delay is still there. Here's the current spec: https://hastebin.com/fapijujewu.lua |
Just used your config on my home directory (including hidden it has 1.130.000 files. Edit: sorting does take a while there obivoulsy. Doing it on the neovim souce code, sorting is also instatntly (1340 files) |
There is most definitely something different between my lazy config and how it behaves with my legacy setup. I just compared it again and there is a 1 second delay with telescope on lazy which is not there with my old config. Could it be that something else is blocking telescope, another plugin or something? I have my lazy setup here, and my legacy config is here, if there is any clue to be had as to what is happening. I just now tried to remove all other plugin specs from my plugins folder, leaving only telescope. After cleaning out all other plugins the delay is still there. I can see that lualine appears at the same time as the telescope results, could it be possible that lualine is somehow affecting this? |
The links you posted don't work for me. They're not public probably? |
Oh shit, sorry! I thought that repo was public already, it should be sorted now though. |
The only difference seems to be Also if you see it is slow, can you say exactly what you mean?
After that, what is slow for you? It takes a second before the Telescope window opens? Also, check |
I did a couple of screen recordings trying to show the issue; in both clips what I'm doing is
In this first clip I'm using my legacy packer setup, and you can see that telescope populates the prompt with files instantly, as would be expected. In this other clip I have my lazy configuration in place, and its clear how it for some reason takes a huge amount of time before telescope populates the same list of files. Here's the imgur post to be able to play them side by side as well. @folke when you say to "wait till everything is loaded", what do you mean? Isn't telescope supposed to load up immediately since I set it to If I open neovim and just sit and wait for a few seconds and then open telescope, then at that point it does populate the prompt instantly, so there is some kind of startup going on which is preventing telescope from doing its thing right away. I checked the profiling in lazy, with the output below, lazy measures the startup time as 73ms, I'm not sure what's included in that though, lualine for instance doesn't show up within 1 second, which also seems to coincide with telescope being ready.
|
I think I know what the problem is! You are using |
To really compare it, best to comment the line |
Can't be that, you are using LAzyVim and I already set |
When you are testing, you do try it in the same directory right? |
Yes, I always test in the same folder to keep it consistent. I tried commenting out |
What if you comment the line below? Then LazyVim will load, but without any of your extra plugins. https://gitlab.com/altosys/dotfiles/-/blob/lazy/links/.config/nvim/lua/config/lazy.lua#L14 If that works as expected, then change that line to only additionally load telescope, so make it |
I commented that line out, but telescope is still slow. I would say it's a bit faster, but still far from instant as it should be. |
What does Something must be loading after lazy and before you run telescope. Your screencast is definitely not normal |
Did you already check |
I checked it again now, this is what it says:
|
|
Super odd all of this. You'll have to figure it out on your own. It's hard for me to debug when I don't have anything reproducible. It's indeed also weird that it takes a second before lualine shows. But since you don't see anything in either startuptime or lazy profile, it must be something not during startup. But what could that be then? Now that I think about it, it could be the checker! Try setting That triggers right after startup to check for updates. And during that time, it's normal that things would be slower for a second or so. If that's the issue then either you have to live with it (only once per startup), you can disable it, or you can set the checker concurrency to a low number, so it will have a smaller footprint. |
I tried disabling the checker, that didn't make a noticeable difference. What I did find is that if I just went and removed all my nvim stuff so that I only kept my keymaps and vanilla lazyvim without any plugin specs etc, then telescope works as it should, blazingly fast. So what I'll do is I'll nuke everything, then bring things back piece by piece while checking along the way if and when the telescope issue appears. I'll report back any findings of course and perhaps we'll get to the bottom of this. Also I can't begin to thank you enough for all your efforts in helping me, this has truly been a headscratcher. I really appreciate all the support since I really want to be able to use lazy, I think you really knocked it out of the park with this one :) |
Sounds good and do let me know if you find anything :) Thanks! |
So finally coming back to this after being insanely busy for the past two weeks. I couldn't find anything causing the startup delay, I think it must've been some leftover file in my |
I noticed after setting up the the lazyvim starter that my usual mode of starting up nvim and telescoping for a file (
nvim -> <leader>ff -> open and edit
) was noticeably slower, instead of being instantaneous it took roughly half a second or more before the files showed up in the telescope prompt.I then noticed that the prompt said
Git Files
and that the files shown are from the entire git repo and not from the current working directory and down. So I looked around and found that there seems to be a telescope customization for the file search here which toggles betweenGit Files
andFind Files
search.Since I've defined the below keymap in my telescope plugin config I was expecting it to behave as before lazyvim with plain find_files (which is much faster in my case).
Since the customization of this telescope behavior is "upstream" in lazyvim, is there an easy way for me to disable it from my telescope plugin spec?
The text was updated successfully, but these errors were encountered: