Skip to content

Setup function not callable if empty opts are passed #98

Closed Answered by stevearc
salvaft asked this question in Q&A
Discussion options

You must be logged in to vote

dressing.nvim will set its config options to be whatever the latest call to setup passes in

M.setup = function(opts)
require("dressing.config").update(opts)

The issue is that you're fighting with lazy.nvim. It expects you to handle your setup in the definition of the plugin, either by using opts = {...}, or config = true, or

config = function(plugin, opts)
  require('dressing').setup({})
end

Defining the plugin in one place and calling the setup function in another does work, but isn't really how it was meant to be used. And as you have discovered you will want to be careful about what options you pass arou…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by salvaft
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants