-
Notifications
You must be signed in to change notification settings - Fork 14
Description
I'll talk about lazy.nvim specifically, but I imagine this would also apply to other plugin managers as well.
I would rather have colorschemes load as necessary, but I noticed that when my plugins are configured to be lazy-loaded, namu colorpicker does not show them. As a result I tried using event = VeryLazy, which makes them load later instead of on startup, which does of course work to make them show in namu, but the autocmd to load one of these at startup will not find it and default back to tokyonight (since VimEnter happens before VeryLazy, which I didn't seem to be able to set as an autocmd event, either).
I'm not sure the best solution, again, I'll talk about what I'd imagine for lazy.nvim but it would have to be more generalized. Under namu, I can configure "dependencies", so I thought maybe I could add colorscheme plugins under there, and then it will load them when namu loads. But, the VimEnter command would still need to be delayed... since namu isn't loaded at VimEnter (& doing so would result in loading all of the colorschemes. Hmm...). One other thought I had would be loading whatever plugin the colorscheme comes from in the VimEnter autocmd, but I don't know how to get the plugin name from vim.g.colors_name/vim.g.NAMU_SCHEME (or if it would just be too slow to do such a lookup?), especially not in a compatible way to all plugin managers.
Ultimately I guess the request is just that it would be nice to lazy load all colorschemes that aren't currently set as the default, not actually sure how complicated that is since I'm not a plugin writer... so of course feel free to tell me to f off, lol.
Thanks again!