[Feature Request] Move options to `opts` argument in `setup()`
Consider migrating options to the opts arg in setup(), which is a convention in many Lua based plugins for Neovim now.
For example, instead of:
vim.g.molten_image_provider = "image.nvim"
vim.g.molten_virt_text_output = true
We have
{
"benlubas/molten-nvim",
opts = {
image_provider = "image.nvim",
virt_text_output = true
} -- implicitly calling `require"molten".setup(opts)` by Lazy.nvim
}
Related to #330
A note for future implementation: the problem in #330 may need to be addressed first, since user may want to define key in LazySpec, which will cause the setup(opts) be called only when the corresponding key mapping is used. Thus leaving a corner case where commands are called without opts set.
This needs a structure change but it won't be a drastic one.
- [ ] Define a single
Moltencommand in Lua - [ ] Change the commands defined in Python to functions instead (via
@pynvim.functiondecorator, this would be a simple search and replace) - [ ] In Lua, properly routes different subcommand to their corresponding function in Python.
This seems to be a tangible roadmap without significant changes. It would also be a good time to migrate to a modern Command subcommand API.