Replies: 1 comment 2 replies
-
I would suggest using try |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone
I want to lazy-load plugins when I can actually edit the code on my current buffer. I want to defer loading the plugins when Neovim initially opens netrw because I don't need the plugins I use for netrw. Loading those plugins for netrw would cause some overhead.
I have tried to set up lazy-loading plugins by:
This works when reading a file to the buffer, but doesn't work when creating a new file inside neovim using
:enew
, or on the Neovim's splash screen.In other words if I sequentially use commands:
nvim .
in the shell command line, opening netrw on the current working directory:enew
in the neovim command line after the netrw is displayedDoesn't trigger
BufReadPre
,BufReadPost
, orBufNewFile
event and I can't lazy load the plugin this way.This situation also applies to when I open neovim by
nvim
and arrive at the splash screen, I'd like the plugin to be loaded by this time:nvim
in the shell command line without any other argumentI would also like to avoid the plugin to be loaded at opening a netrw buffer by
nvim .
To summarize, I want a plugin to be loaded when:
nvim
, then on the splash screen with an empty buffernvim .
then:enew
But not loaded when:
nvim .
which opens netrw on my current working directorynvim [any directory]
which opens netrw on the argument directoryCan someone help me set up plugins to lazy-load the plugins in this context?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions