lsp-pyright
lsp-pyright copied to clipboard
Provide a way to change how the python executable is found
Problem
I've found it difficult to change which version of Python is in
use. Right now it defaults to finding a parent .venv but I would
rather it default to using the python
executable that I've set.
Solution
To maintain backwards compatibility I've modified
lsp-pyright-locate-python
to support a new list of "locating"
functions. These functions each return a python
executable or nil
when the search method fails. The order of functions defaults to what
existed beforehand but now it is possible to customize
that order by
modifying lsp-pyright-python-search-functions
.
Testing
I've tested the default configuration. It returned the cursed configuration that I did not want.
I also tested with
(setq lsp-pyright-python-search-functions
'(lsp-pyright--locate-python-python))
which is what I've been using and intend on using
@seagle0128 reaching out since from what I can tell you're the primary maintainer of this repository. Is this something you'd be able to look at? TIA
@seagle0128, is there anything that I could do to help this along?
Sorry for being late. Already merged.
@seagle0128 thanks for the review and sorry for the nags! I really appreciate the package and the support that you offer for it