aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorHirokazu Hata <h.hata.ai.t@gmail.com>2020-03-21 14:38:22 +0900
committerHirokazu Hata <h.hata.ai.t@gmail.com>2020-03-21 14:38:22 +0900
commite4a38d1ee6feb5fe48d232be2d79b450da9365f8 (patch)
treea4b917f1a56358aa48e75764558301b6c1a66465 /lua
parent[docgen] Update README.md (diff)
downloadnvim-lspconfig-e4a38d1ee6feb5fe48d232be2d79b450da9365f8.tar
nvim-lspconfig-e4a38d1ee6feb5fe48d232be2d79b450da9365f8.tar.gz
nvim-lspconfig-e4a38d1ee6feb5fe48d232be2d79b450da9365f8.tar.bz2
nvim-lspconfig-e4a38d1ee6feb5fe48d232be2d79b450da9365f8.tar.lz
nvim-lspconfig-e4a38d1ee6feb5fe48d232be2d79b450da9365f8.tar.xz
nvim-lspconfig-e4a38d1ee6feb5fe48d232be2d79b450da9365f8.tar.zst
nvim-lspconfig-e4a38d1ee6feb5fe48d232be2d79b450da9365f8.zip
fix: require target language server module before LspInstall and LspInstallInfo
At 6d380677502de0a750dc61dc537fedccebfefd5d, make requiring all language server modules lazy. That commit broke LspInstall and LspInstallInfo
Diffstat (limited to 'lua')
-rw-r--r--lua/nvim_lsp.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/lua/nvim_lsp.lua b/lua/nvim_lsp.lua
index f5c77305..2b9154ad 100644
--- a/lua/nvim_lsp.lua
+++ b/lua/nvim_lsp.lua
@@ -23,6 +23,9 @@ function M._root._setup()
M._root.commands = {
LspInstall = {
function(name)
+ if configs[name] == nil then
+ pcall(require('nvim_lsp/'..name))
+ end
local config = configs[name]
if not config then
return print("Invalid server name:", name)
@@ -50,6 +53,9 @@ function M._root._setup()
end
return print(vim.inspect(res))
end
+ if configs[name] == nil then
+ pcall(require('nvim_lsp/'..name))
+ end
local config = configs[name]
if not config then
return print("Invalid server name:", name)