Hi, I am just posting here the solution of a problem on which I spent all my day...
The problem: many lua plugins require for their configuration, or even to run, to call a lua function. For example:
use({
'emileferreira/nvim-strict',
config = function()
require('strict').setup()
end
})
How to call such a function from vim plug like in packer (above)?
Of course all these plugins I found did'nt give any instructions about installing them with vim plug (always Lazy, packer... lua things...). On the web I found many tutorial about setting the vim config in lua, even to use vim plug from lua, but not the inverse.
Like often, it was so simple and evident than no one on the web thought it was usefull to explain that for the newbies a bit slow on the uptake like me... The solution is to use an include of lua code in init.vim, BUT not in the vim plug block delimited by call plug#begin() and call plug#end() but after (if I understood well!). Like that:
Hi, I am just posting here the solution of a problem on which I spent all my day...
The problem: many lua plugins require for their configuration, or even to run, to call a lua function. For example:
How to call such a function from vim plug like in packer (above)?
Of course all these plugins I found did'nt give any instructions about installing them with vim plug (always Lazy, packer... lua things...). On the web I found many tutorial about setting the vim config in lua, even to use vim plug from lua, but not the inverse.
Like often, it was so simple and evident than no one on the web thought it was usefull to explain that for the newbies a bit slow on the uptake like me... The solution is to use an include of lua code in init.vim, BUT not in the vim plug block delimited by
call plug#begin()
andcall plug#end()
but after (if I understood well!). Like that:One day of roaming on the web to understand that... I hope this small post will avoid such a exhausting experience to some people after me!