mirror of https://gitlab.com/baco/dotconf.git
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:
parent
fe8b7b0238
commit
8418e53327
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue