mirror of
https://github.com/folke/lazy.nvim.git
synced 2025-04-19 21:06:46 +00:00
feat(spec): added support for importing multiple spec modules with import = "foobar"
This commit is contained in:
parent
3974a6cbe3
commit
39b66027a5
4 changed files with 57 additions and 40 deletions
|
@ -144,9 +144,12 @@ M.defaults = {
|
|||
|
||||
M.ns = vim.api.nvim_create_namespace("lazy")
|
||||
|
||||
---@type string|LazySpec Should be either a string pointing to a module, or a spec
|
||||
---@type LazySpec
|
||||
M.spec = nil
|
||||
|
||||
---@type LazySpecLoader
|
||||
M.parsed = nil
|
||||
|
||||
---@type table<string, LazyPlugin>
|
||||
M.plugins = {}
|
||||
|
||||
|
@ -167,7 +170,7 @@ M.headless = #vim.api.nvim_list_uis() == 0
|
|||
---@param spec LazySpec
|
||||
---@param opts? LazyConfig
|
||||
function M.setup(spec, opts)
|
||||
M.spec = spec
|
||||
M.spec = type(spec) == "string" and { import = spec } or spec
|
||||
M.options = vim.tbl_deep_extend("force", M.defaults, opts or {})
|
||||
M.options.performance.cache = require("lazy.core.cache")
|
||||
table.insert(M.options.install.colorscheme, "habamax")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue