mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-03 11:00:05 +08:00
40 lines
819 B
Lua
Vendored
40 lines
819 B
Lua
Vendored
local M = {}
|
|
|
|
local function neoconf(config)
|
|
pcall(function()
|
|
require("neoconf.plugins").register({
|
|
on_schema = function(schema)
|
|
schema:import("neodev", config.defaults)
|
|
schema:set("neodev.library.plugins", {
|
|
description = "true/false or an array of plugin names to enable",
|
|
anyOf = {
|
|
{ type = "boolean" },
|
|
{ type = "array", items = { type = "string" } },
|
|
},
|
|
})
|
|
end,
|
|
})
|
|
end)
|
|
end
|
|
|
|
---@param opts? LuaDevOptions
|
|
function M.setup(opts)
|
|
local config = require("neodev.config")
|
|
config.setup(opts)
|
|
|
|
if config.options.lspconfig then
|
|
require("neodev.lsp").setup()
|
|
end
|
|
|
|
neoconf(config)
|
|
|
|
-- leave this for now for backward compatibility
|
|
return {
|
|
settings = {
|
|
legacy = true,
|
|
},
|
|
}
|
|
end
|
|
|
|
return M
|