Skip to content

feature: Respect priority for plugins lazy-loaded on events #2098

@Sturdy7435

Description

@Sturdy7435

Did you check the docs?

  • I have read all the lazy.nvim docs

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

I'd prefer UI plugins like lualine.nvim to be loaded on VeryLazy, but still before other VeryLazy plugins.
This seems not possible since priority has no effect on lazy loaded plugins.

Describe the solution you'd like

I would like the priority option to work on plugins lazy loaded by an event.

Describe alternatives you've considered

I tried using the LazyDone and LazyVimStarted events, but they are invalid.

The VimEnter event does not work because it runs before LazyDone, so the plugin slows startup.

The BufReadPre event runs before LazyDone when a file is passed as an argument, slowing startup:
nvim file.txt

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions