I do not understand optionnal loading #962
Unanswered
probakilla
asked this question in
Q&A
Replies: 1 comment 2 replies
-
You should provide a function to the config property: use({
"williamboman/nvim-lsp-installer",
ft = source_code_files,
config = function() load_plug_conf('lsp_installer') end,
}) |
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
-
Hello !
I recently tried to play with optionnal plugin, but I did not managed to get it working (yet).
For example, I got a plugin (williamboman/nvim-lsp-installer), that i tried to load on specific file types, so I tried something like this :
The problem is that when I start NeoVim, I got an error that say me that it cannot "require" the said package.
The "config" key is not supposed to be executed AFTER the plugin is loaded ? It looks like it is done before.
Furthermore, I also tried to play with the "opt" and "cmd" options, but I did understand how to get it working as well.
I read the README several times, but nothing helped me. Without any "ft", "opt" or "cmd" my configuration is working, but I wanted to load modules only when I need them.
Here is the repo of my full config : https://gitlab.com/J.pilleux/stow_dotfiles/-/tree/master/nvim/.config/nvim
Thanks in advance !
Beta Was this translation helpful? Give feedback.
All reactions