Clarify when the config function runs #873
Replies: 2 comments 1 reply
-
Have a look at https://github.com/wbthomason/packer.nvim#specifying-plugins= |
Beta Was this translation helpful? Give feedback.
-
I'm curious about this too. I am trying out nvim for the first time, and using quick.nvim as a base. One thing I noticed is that some of the require('lualine').setup()
return require('packer').startup(function()
use {
'nvim-lualine/lualine.nvim',
requires = {'kyazdani42/nvim-web-devicons', opt = true}
}
use {
"blackCauldron7/surround.nvim",
config = function()
require"surround".setup {mappings_style = "surround"}
end
}
end) I tried moving the |
Beta Was this translation helpful? Give feedback.
-
Hello, thanks for this fantastic plugin, it's really powerful.
I have a doubt about the config keyword when it is a function.
I am not sure if it runs once when the package is installed or every time the package is loaded. To be honest, I'm still a bir confused about how neovim loads plugins. I had the impression that packer just downloads and puts them on the runtime path, then neovim loads them before loading the init configuration. For that reason, I started to think that maybe config functions are only run when the package gets installed? But looking at the common usages, I think this does not makes sense.
It will be awesome if the intended usage of this property and when it runs (every time you open neovim VS when plugin is installed) will be awesome.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions