Collecting opts from dummy plugin #1871
-
I'd like to create a dummy plugin (no actual plugin exists) where the sole purpose is to leverage lazy.nvim to collect It looks like if I use require("lazy").setup({
spec = {
-- collect all opts from dummies
{ import = "plugins" },
-- run the config with all collected dummy opts
{ import = "final" },
}
}) -- plugins/file.lua
return {
{
name = "dummy",
dir = ".",
opts = {
foo = "bar",
},
},
}
-- final/file.lua
return {
{
name = "dummy",
dir = ".",
opts = {
bar = "baz",
},
config = function(_, opts)
vim.notify(vim.inspect(opts))
end,
},
} This gets printed by {
bar = "baz",
foo = "bar"
} |
Beta Was this translation helpful? Give feedback.
Answered by
folke
Jan 2, 2025
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
fredrikaverpil
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
virtual=true