From eb012f03bb3b4aca9e875d146008b923d0e07e65 Mon Sep 17 00:00:00 2001 From: Dionisio E Alonso Date: Tue, 19 Mar 2024 02:44:36 -0300 Subject: fix(basepyright): correct command (#3082) * feat: add basedpyright support * fix(basedpyright): correct settings schema Settings are stored under a different key for this fork. Instead of using the original `python` key, now settings specific to this LSP server are stored under `basedpyright` map key. * fix(basedpyright): correct plugin command The command was doing nothing because as `python` is no longer the default namespace for settings, for this LSP server, `client.settings.python` has a `nil` value. Hence the table couldn't be extended. --- lua/lspconfig/server_configurations/basedpyright.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua') diff --git a/lua/lspconfig/server_configurations/basedpyright.lua b/lua/lspconfig/server_configurations/basedpyright.lua index a360e8c9..172ed237 100644 --- a/lua/lspconfig/server_configurations/basedpyright.lua +++ b/lua/lspconfig/server_configurations/basedpyright.lua @@ -32,7 +32,7 @@ local function set_python_path(path) } for _, client in ipairs(clients) do if client.settings then - client.settings.python = vim.tbl_deep_extend('force', client.settings.python, { pythonPath = path }) + client.settings.python = vim.tbl_deep_extend('force', client.settings.python or {}, { pythonPath = path }) else client.config.settings = vim.tbl_deep_extend('force', client.config.settings, { python = { pythonPath = path } }) end -- cgit v1.2.3-70-g09d2