From f4dee350521da3b95fffdfdb94f7a1b5cdb88d79 Mon Sep 17 00:00:00 2001 From: Stanislav Asunkin <1353637+stasjok@users.noreply.github.com> Date: Sun, 31 Aug 2025 03:57:02 +0300 Subject: fix(pyright): command :LspPyrightSetPythonPath fails #4045 `vim.api.nvim_buf_create_user_command` callback is called with a table argument that contains a parsed command. Need to use `args` or `fargs` key to get command arguments. --- lsp/basedpyright.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lsp/basedpyright.lua') diff --git a/lsp/basedpyright.lua b/lsp/basedpyright.lua index e468b94d..5f54c3d2 100644 --- a/lsp/basedpyright.lua +++ b/lsp/basedpyright.lua @@ -4,7 +4,8 @@ --- --- `basedpyright`, a static type checker and language server for python -local function set_python_path(path) +local function set_python_path(command) + local path = command.args local clients = vim.lsp.get_clients { bufnr = vim.api.nvim_get_current_buf(), name = 'basedpyright', -- cgit v1.2.3-70-g09d2