ensure_installed = vim.tbl_deep_extend(
"force",
ensure_installed,
- LazyVim.opts("mason-lspconfig.nvim").ensure_installed or {}
+ rmz.lazy.opts("mason-lspconfig.nvim").ensure_installed or {}
),
handlers = { setup },
})
return {}
end
local spec = vim.tbl_extend("force", {}, M.get())
- local opts = LazyVim.opts("nvim-lspconfig")
+ local opts = rmz.lazy.opts("nvim-lspconfig")
local clients = rmz.lsp.get_clients({ bufnr = buffer })
for _, client in ipairs(clients) do
local maps = opts.servers[client.name] and opts.servers[client.name].keys or {}
---@class rmz.util
local M = {
ui = require("rmz.util.ui"),
+ lazy = require("rmz.util.lazy"),
lsp = require("rmz.util.lsp"),
}
--- /dev/null
+---@class rmz.util.lazy
+local M = {}
+
+---@param name string
+function M.get_plugin(name)
+ return require("lazy.core.config").spec.plugins[name]
+end
+
+---@param name string
+function M.opts(name)
+ local plugin = M.get_plugin(name)
+ if not plugin then
+ return {}
+ end
+ local Plugin = require("lazy.core.plugin")
+ return Plugin.values(plugin, "opts", false)
+end
+
+return M