Is it possible to use opts
and config
together?
#1652
Replies: 1 comment 2 replies
-
{
opts = {}
config = function(_, opts)
require("foo").setup(opts)
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
Uh oh!
There was an error while loading. Please reload this page.
-
👋🏻
I have a configuration that currently uses
config
set to a function.The function does the standard
.setup({...})
call, which by itself could just be moved toopts = {...}
but the config function also does some other stuff like setting up autocommands usingvim.api.nvim_create_augroup
andvim.api.nvim_create_autocmd
.So do I keep everything inside the
config
function or can I move the setup options toopts
and leaveconfig
function for just the autocommand stuff? Or is there a better/more correct way to configure "other stuff" around the plugin?Thanks!
Beta Was this translation helpful? Give feedback.
All reactions