aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorFolke Lemaitre <folke.lemaitre@gmail.com>2021-07-19 23:12:57 +0200
committerFolke Lemaitre <folke.lemaitre@gmail.com>2021-07-19 23:12:57 +0200
commitddfba1c750036c8711375d650009898bf02b0ec5 (patch)
tree05068e8507abdf9dc63a88dee4ae9fd17f3dacc5 /lua
parent[docgen] Update CONFIG.md (diff)
downloadnvim-lspconfig-ddfba1c750036c8711375d650009898bf02b0ec5.tar
nvim-lspconfig-ddfba1c750036c8711375d650009898bf02b0ec5.tar.gz
nvim-lspconfig-ddfba1c750036c8711375d650009898bf02b0ec5.tar.bz2
nvim-lspconfig-ddfba1c750036c8711375d650009898bf02b0ec5.tar.lz
nvim-lspconfig-ddfba1c750036c8711375d650009898bf02b0ec5.tar.xz
nvim-lspconfig-ddfba1c750036c8711375d650009898bf02b0ec5.tar.zst
nvim-lspconfig-ddfba1c750036c8711375d650009898bf02b0ec5.zip
feat: added option to disable an lsp server from the config
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/util.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/lua/lspconfig/util.lua b/lua/lspconfig/util.lua
index c18f3072..d2925edf 100644
--- a/lua/lspconfig/util.lua
+++ b/lua/lspconfig/util.lua
@@ -222,6 +222,10 @@ function M.server_per_root_dir_manager(_make_config)
local client_id = clients[root_dir]
if not client_id then
local new_config = _make_config(root_dir)
+ -- do nothing if the client is not enabled
+ if new_config.enabled == false then
+ return
+ end
--TODO:mjlbach -- these prints only show up with nvim_error_writeln()
if not new_config.cmd then
print(