From 0b3e5ce95dd70cbeb9dcf0f690f5f7210e004198 Mon Sep 17 00:00:00 2001 From: Access Date: Sun, 23 Oct 2022 14:11:24 +0800 Subject: [PATCH] fix: cmd vim.lsp.rpc.connect by user (#2213) when user what to set cmd to vim.rpc.connect, but it is a function --- lua/lspconfig/configs.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lua/lspconfig/configs.lua b/lua/lspconfig/configs.lua index b963e42453..a6ed27193c 100644 --- a/lua/lspconfig/configs.lua +++ b/lua/lspconfig/configs.lua @@ -34,7 +34,11 @@ function configs.__newindex(t, config_name, config_def) local lsp_group = vim.api.nvim_create_augroup('lspconfig', { clear = false }) validate { - cmd = { user_config.cmd, 't', true }, + cmd = { + user_config.cmd, + { 'f', 't' }, + true, + }, root_dir = { user_config.root_dir, 'f', true }, filetypes = { user_config.filetype, 't', true }, on_new_config = { user_config.on_new_config, 'f', true },