From 53af06bc3e0d370dc64f77526d8a82e6078d14a8 Mon Sep 17 00:00:00 2001 From: Oscar Wallberg Date: Sun, 1 Oct 2023 17:18:47 +0200 Subject: [PATCH] Fix error handling --- lua/lsp.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lua/lsp.lua b/lua/lsp.lua index a360c97..aa587d6 100644 --- a/lua/lsp.lua +++ b/lua/lsp.lua @@ -38,11 +38,9 @@ P.config = { } for server, _ in pairs(P.config) do - local ok, resp = pcall(require, "lsp." .. server) - if not ok then - return - end - P.config[server] = resp + utils.try_require("lsp." .. server, package_name, function(mod) + P.config[server] = mod + end) end local function ca_rename()