fix(lsp): use empty default_config if not given for custom servers
This commit is contained in:
@@ -359,8 +359,11 @@ function M.new(name, config)
|
|||||||
|
|
||||||
local ok, resp = pcall(require, "lspconfig.configs." .. name)
|
local ok, resp = pcall(require, "lspconfig.configs." .. name)
|
||||||
if not ok and config.lspconfig then
|
if not ok and config.lspconfig then
|
||||||
local configs = require("lspconfig.configs")
|
require("lspconfig.configs")[name] = vim.tbl_deep_extend(
|
||||||
configs[name] = { default_config = vim.deepcopy(config.lspconfig) }
|
"keep",
|
||||||
|
{ default_config = {} },
|
||||||
|
config.lspconfig
|
||||||
|
)
|
||||||
elseif ok then
|
elseif ok then
|
||||||
config.lspconfig = vim.tbl_deep_extend(
|
config.lspconfig = vim.tbl_deep_extend(
|
||||||
"keep",
|
"keep",
|
||||||
|
|||||||
Reference in New Issue
Block a user