feat(LSP): Change default python executable

On most Linux distros python3 is the default, even more, there is no
Python version 2 to be installed anyways, hence there is no need to
distinguish which python version to load anymore.

The default python executable has come to be `python` even though the
Python version is 3.x.  Furthermore, on all virtual environments
`python` exists and is linked to point to a Python 3.x executable.
This commit is contained in:
Dionisio E Alonso 2024-03-02 17:00:09 -03:00
parent fe8b7b0238
commit 8418e53327
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ local pylsp_settings = {
}
local venv_dir = vim.fn.finddir(".venv/", vim.fn.expand("%:p:h") .. ";")
local python_exec = vim.fn.findfile("python3", venv_dir .. "/bin;")
local python_exec = vim.fn.findfile("python", venv_dir .. "/bin;")
if venv_dir ~= "" and python_exec ~= "" then
pylsp_settings.plugins.jedi = {environment = python_exec}
end