Replies: 1 comment
-
Actually the more I read the README and let it sit for a while the more I get it I think. Loading a plugin essentially means "sourcing" it just means neovim knows it exists, so for example if plugin A isn't loaded then I might not be able to do :h A for example. In terms of sequencing, there doesn't seem to be a specific order other than dependencies load first before the "parent" plugin is loaded since the "parent" plugin DEPENDS on them being loaded. By default plugins are loaded at startup unless:
Finally, the config option is executed when a plugin is loaded. If there is no config option set then nothing is ran. If it's set to true it just runs I think that answers most of my questions. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey!
I was redoing my config for neovim and switched to lazy to manage my packages. I'm a little confused about the sequencing of sutff that is happening and what some options do.
So for example let's take a look at what I have for my lsp spec:
Loading and Config Option
So one issue I encountered is for
mason
as an example. If I don't include theconfig = true
when first installed the build command will fail because it can't find the:MasonUpdate
command, but it seems to work afterwards. If I set theconfig = true
, delete everything and install "for the first time" again the build command works . Why?Is it because if
config
is not set to anything by default when the plugin is loaded it doesn't call it's setup function right away?Another example is with
neodev
. If I start it up without theconfig = true
optionneodev
is not "on", it works once I put theconfig = true
.Leading to my question of, what exactly is "loading"? What does it mean to "load" a plugin. When does a plugin load by default?
Those are my questions regarding loading and the config option.
Dependencies and Sequencing
Do dependencies load in the order that you put them in? So for example so far stuff is working but in the the
mason-lspconfig
README it states that order you call the setup function is important.It should be:
When are dependencies loaded?
Goes back to my question above, what happens when plugins "load" (setup function called?) (config function is called?), when are they "loaded", in what order? How does this change when talking about dependencies?
Lazy Option
So if this is set to true the plugin will NOT be loaded until absolutely necessary, if it's set to false (I think that's the default?) it loads at startup?
Beta Was this translation helpful? Give feedback.
All reactions