From a0d8ea24abd7f6a45286c95e9a10f1bddc1dc347 Mon Sep 17 00:00:00 2001 From: David Hotham Date: Mon, 3 May 2021 19:40:36 +0100 Subject: Wrap dofile in pcall Fixes #876 --- lua/lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua') diff --git a/lua/lspconfig.lua b/lua/lspconfig.lua index 1023167b..798f6234 100644 --- a/lua/lspconfig.lua +++ b/lua/lspconfig.lua @@ -88,7 +88,7 @@ function mt:__index(k) if configs[k] == nil then -- dofile is used here as a performance hack to increase the speed of calls to setup({}) -- dofile does not cache module lookups, and requires the absolute path to the target file - dofile(script_path .. 'lspconfig/' .. k .. ".lua") + pcall(dofile, script_path .. 'lspconfig/' .. k .. ".lua") end return configs[k] end -- cgit v1.2.3-70-g09d2