From eab6d6bfaaadaba60e10f1673b345666169b5db3 Mon Sep 17 00:00:00 2001 From: Oscar Wallberg Date: Mon, 15 Apr 2024 11:17:13 +0200 Subject: [PATCH] fix(lsp): only install if not already available --- lua/lsp/server.lua | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lua/lsp/server.lua b/lua/lsp/server.lua index 5cbf145..0a63cff 100644 --- a/lua/lsp/server.lua +++ b/lua/lsp/server.lua @@ -320,6 +320,11 @@ function M:setup() return end + if vim.fn.executable(self.lspconfig.cmd[1]) == 1 then + self:configure_client() + return + end + if self.mason then self:install(function (success) if success then @@ -327,12 +332,8 @@ function M:setup() end end) else - if vim.fn.executable(self.lspconfig.cmd[1]) == 1 then - self:configure_client() - else - utils.warn(self.name .. " not installed, disabling", module_name) - self.enable = false - end + utils.warn(self.name .. " not installed, disabling", module_name) + self.enable = false end end