From ddfba1c750036c8711375d650009898bf02b0ec5 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Mon, 19 Jul 2021 23:12:57 +0200 Subject: feat: added option to disable an lsp server from the config --- lua/lspconfig/util.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lua') 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( -- cgit v1.2.3-70-g09d2