nvim: Allow registering lsp without providing configuration

This commit is contained in:
Marty Oehme 2025-06-08 17:36:09 +02:00
parent de1591c7a7
commit 8dd268caf2
Signed by: Marty
GPG key ID: 4E535BC19C61886E

View file

@ -72,7 +72,7 @@ local lsp = {
local function register(server_name, config, enabled)
if vim.fn.has("nvim-0.11") == 1 then
vim.lsp.config(server_name, config)
vim.lsp.config(server_name, config or {})
if enabled == false or vim.lsp.config[server_name]["autostart"] == false then
vim.lsp.enable(server_name, false)
else