aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim-lsp-installer/middleware.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/nvim-lsp-installer/middleware.lua')
-rw-r--r--lua/nvim-lsp-installer/middleware.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/lua/nvim-lsp-installer/middleware.lua b/lua/nvim-lsp-installer/middleware.lua
index 3e01b976..cd5c508d 100644
--- a/lua/nvim-lsp-installer/middleware.lua
+++ b/lua/nvim-lsp-installer/middleware.lua
@@ -1,5 +1,6 @@
local util = require "lspconfig.util"
local servers = require "nvim-lsp-installer.servers"
+local settings = require "nvim-lsp-installer.settings"
local M = {}
@@ -25,6 +26,9 @@ function M.register_lspconfig_hook()
local ok, server = servers.get_server(config.name)
if ok then
merge_in_place(config, server._default_options)
+ if settings.current.automatic_installation and not server:is_installed() then
+ server:install()
+ end
end
end)
end