diff options
Diffstat (limited to 'lua/lspconfig.lua')
| -rw-r--r-- | lua/lspconfig.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lua/lspconfig.lua b/lua/lspconfig.lua index 7a6fb080..1023167b 100644 --- a/lua/lspconfig.lua +++ b/lua/lspconfig.lua @@ -4,6 +4,8 @@ local M = { util = require 'lspconfig/util'; } +local script_path = M.util.script_path() + M._root = {} function M.available_servers() @@ -84,7 +86,9 @@ end local mt = {} function mt:__index(k) if configs[k] == nil then - pcall(require, 'lspconfig/'..k) + -- 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") end return configs[k] end |
