aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorDionisio E Alonso <baco@users.noreply.github.com>2024-03-19 02:44:36 -0300
committerGitHub <noreply@github.com>2024-03-19 13:44:36 +0800
commiteb012f03bb3b4aca9e875d146008b923d0e07e65 (patch)
treeb8f4fb398fac56a8defd61c96fa391f9e56b5f21 /lua
parentdocs: update server_configurations.md (diff)
downloadnvim-lspconfig-eb012f03bb3b4aca9e875d146008b923d0e07e65.tar
nvim-lspconfig-eb012f03bb3b4aca9e875d146008b923d0e07e65.tar.gz
nvim-lspconfig-eb012f03bb3b4aca9e875d146008b923d0e07e65.tar.bz2
nvim-lspconfig-eb012f03bb3b4aca9e875d146008b923d0e07e65.tar.lz
nvim-lspconfig-eb012f03bb3b4aca9e875d146008b923d0e07e65.tar.xz
nvim-lspconfig-eb012f03bb3b4aca9e875d146008b923d0e07e65.tar.zst
nvim-lspconfig-eb012f03bb3b4aca9e875d146008b923d0e07e65.zip
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.
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/server_configurations/basedpyright.lua2
1 files changed, 1 insertions, 1 deletions
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