From 5ea43223f03db07ea9951c62d6d66e8ca8319412 Mon Sep 17 00:00:00 2001 From: William Boman Date: Fri, 29 Apr 2022 16:02:43 +0200 Subject: fix(middleware): only modify config for installed servers during setup This is to avoid modifying configs for servers that users don't want to manage via nvim-lsp-installer. --- lua/nvim-lsp-installer/middleware.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lua/nvim-lsp-installer/middleware.lua') diff --git a/lua/nvim-lsp-installer/middleware.lua b/lua/nvim-lsp-installer/middleware.lua index cd5c508d..7def4276 100644 --- a/lua/nvim-lsp-installer/middleware.lua +++ b/lua/nvim-lsp-installer/middleware.lua @@ -25,7 +25,9 @@ function M.register_lspconfig_hook() util.on_setup = util.add_hook_before(util.on_setup, function(config) local ok, server = servers.get_server(config.name) if ok then - merge_in_place(config, server._default_options) + if server:is_installed() then + merge_in_place(config, server._default_options) + end if settings.current.automatic_installation and not server:is_installed() then server:install() end -- cgit v1.2.3-70-g09d2