python-lsp/python-lsp-server

set the environment for the lsp server

lmascelli opened this issue · 1 comments

hi,
i'm sorry if lots of people already asked this question and i'll ask it again but with all the solutions i've read i still have not figured out how to correctly set that. The situation is the following:
i'm working on an embeddable python environment, obtained from the embeddable python distribution, extracted from the archive, not a virtual env, with a library i made and installed in that environment. the code runs without issues.
That said, how can i set the pylsp server to use THAT environment?

Hey @lmascelli, thanks for reporting. This can be done by setting the pylsp.plugins.jedi.environment configuration option to the path of your Python executable.

All configuration options for the server can be found here:

https://github.com/python-lsp/python-lsp-server/blob/develop/CONFIGURATION.md