Open kkharji opened 3 years ago
Hi, thanks for trying out the plugin!
There's a section in the README which describes how to reduce the startup time: https://github.com/gelguy/wilder.nvim#faster-startup-time.
The plugin will be lazily loaded on the first CmdlineEnter
. Note that the plugin will still take 200ms to load, just that it isn't loaded on startup.
Regarding porting to lua, it's possible but at the moment I want to keep Vim compatibility.
I'll be interested to know if the CmdlineEnter
lazy load suggestion works for you, or even that is too slow (since the first :
command will have to load the plugin). If it's still too slow I can explore other options.
Drive by comment: I use wilder whilst lazy loading on CmdlineEnter
with packer.nvim
and that is a big improvement, the load time isn't really discernible at that point. It is still a shame that that is needed at all but not a deal breaker since it can be deferred.
For anyone reading this that is a packer user, this works for the most part but packer has a few quirks when it comes to multiple remote plugins so if you use other python based plugins I suggest lazy loading on CursorHold
or something.
Can the workaround also gracefully fallback when wilder.nvim
isn't in the plugins? For me it always will error on CmdlineEnter
.
No permutation of exists()
and checking for if &rtp =~ 'wilder.nvim'
works in all cases. It either doesn't startup wilder, breaks lazy loading on the first CmdlineEnter
.
System: Using vim 9.0, patches 1-477, wilder.nvim at 679f348.
Assume the latest Faster startup time example:
" ++once supported in Nvim 0.4+ and Vim 8.1+
autocmd CmdlineEnter * ++once call s:wilder_init() | call wilder#main#start()
function! s:wilder_init() abort
call wilder#setup(...)
call wilder#set_option(..., ...)
call wilder#set_option('pipeline', ...)
call wilder#set_option('renderer', ...)
endfunction
Error detected while processing CmdlineEnter Autocommands for "*"..function <SNR>5_wilder_init:
E117: Unknown function: wilder#setup
Is there any way to get this to fallback safely when the plugin hasn't been installed yet?
Hey @gelguy amazing work.
I wanted to try out wilder but the cost is ridiculously high.
using startuptime.vim
I have more than 70 plugins installed and none of them take more than 2%
Any plans to port wilder.nvim to lua?
Thanks