Auto require plugin #17
-
I followed some of the instructions in here for my new plugin. I did the vim.g config table, and created a single command with autocompletion. Now I'm wondering about this, provided I have a lua/myplugin.lua which creates my magnificent autocompletion command, is it okay for me to have a plugin/init.lua file which requires('myplugin')? My plugin lazy loads everything when required as suggested in this repo. Having the auto self require will make the command directly available to the users, so they don't have to require my plugin in their config. Curious about the best practice on this point. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey 👋
Yep, I would recommend that (see the initialisation section). It can be a good idea to create the commands in the |
Beta Was this translation helpful? Give feedback.
Hey 👋
Yep, I would recommend that (see the initialisation section).
It can be a good idea to create the commands in the
plugin/
script, in such a way that nothing needs to berequire
d during initialisation.