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

feature: show a message during startup #1403

Closed
1 task done
ilan-schemoul opened this issue Apr 2, 2024 · 3 comments
Closed
1 task done

feature: show a message during startup #1403

ilan-schemoul opened this issue Apr 2, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@ilan-schemoul
Copy link

Did you check the docs?

  • I have read all the lazy.nvim docs

Is your feature request related to a problem? Please describe.

Sometimes things are a bit slow to load (slow TS parser) and it is expected (I don't want to lazy load everything)
Lazy helps but sometimes some things I really want on startup (or I can defer a bit with BufEnter but I will still wait for them to load before being able to edit my code) like TS on big files can take up to a second to load. Lazy loading is super useful but things in certain cases take a second to load and it's fine.
The thing is even 1 second seems super slow when there is no loading message.

Describe the solution you'd like

I want to know if we can show a message ("Loading..." or whatever) or spinner or whatever to makes me wait when nvim loads.

Describe alternatives you've considered

I cannot think of anything else right now. Anything visual to make my monkey brain wait is fine.

Additional context

No response

@ilan-schemoul ilan-schemoul added the enhancement New feature or request label Apr 2, 2024
@folke
Copy link
Owner

folke commented Apr 11, 2024

You can implement something like this yourself using multiple events.

However, this really seems overkill. Just wait till it's loaded, or implement lazy loading to make it faster.

My config loads in about 20ms, so there's really no need to show any kind of progress.

@folke folke closed this as not planned Won't fix, can't repro, duplicate, stale Apr 11, 2024
@ilan-schemoul
Copy link
Author

ilan-schemoul commented Apr 13, 2024

Do you have any pointers to such event. ?

I mean I don't know if I'm using lazy loading properly but when it's loading something like the tree sitter (required by color scheme) neovim will freeze and I don't know if it's normal but sometimes treesitter and its dependencies (such as tree sitter text objects) takes a solid second to load. So if I could not use lazyloading for colorscheme/treesitter but instead use a loading screen I'd do it. (BTW colorscheme is already max priority and my PC is powerful)

Also turning my 70 plugins into 70 lazy loaded plugins is a lot of work.

But anyway if you say it's overkill I trust you it's just that even 700ms of blank screen feels like freezing

@dpetka2001
Copy link
Contributor

The only time I observe a slight delay is when lazy.nvim seems to cache the specs for the first time. After that, every subsequent invocation of Neovim is almost instant. Until the next time that lazy.nvim caches again, I don't observe any significant delay.

@folke Do you happen to know how often lazy.nvim caches the specs? Is it something that can be configured like for example how often to check for plugin updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants