Merge pull request 'Fix basedpyright install failure on Debian' (#7) from nvim-basedpyright-venv into master

Reviewed-on: #7
Reviewed-by: branderson <brad@branderson.io>
This commit was merged in pull request #7.
This commit is contained in:
2026-08-17 14:42:55 -07:00
2 changed files with 21 additions and 1 deletions
+18 -1
View File
@@ -1,4 +1,21 @@
local servers = { "basedpyright", "ruff" }
-- ruff is a prebuilt GitHub release binary, but mason installs basedpyright
-- from PyPI into a venv. Debian ships venv's ensurepip separately
-- (python3-venv), and without it every startup fails the install.
local servers = { "ruff" }
local function has_python_venv()
if vim.fn.executable("python3") ~= 1 then
return false
end
vim.fn.system({ "python3", "-c", "import ensurepip" })
return vim.v.shell_error == 0
end
if has_python_venv() then
table.insert(servers, "basedpyright")
else
vim.notify("python3 venv unavailable (install python3-venv): skipping LSP server basedpyright", vim.log.levels.WARN)
end
local npm_servers = { "ts_ls", "svelte", "html", "cssls", "bashls" }
local function has_public_npm()
+3
View File
@@ -6,6 +6,9 @@ powerline
thefuck
tree
nodejs
# Debian splits venv's ensurepip out of python3; mason needs `python3 -m venv`
# to install PyPI-sourced LSP servers (basedpyright)
python3-venv
zsh
htop
jq