Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a way to change how the python executable is found #89

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

ghost
Copy link

@ghost ghost commented Feb 20, 2024

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

@ghost
Copy link
Author

ghost commented Feb 21, 2024

@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

@ghost
Copy link
Author

ghost commented Apr 15, 2024

@seagle0128, is there anything that I could do to help this along?

@seagle0128 seagle0128 merged commit b891a50 into emacs-lsp:master Apr 16, 2024
@seagle0128
Copy link
Collaborator

Sorry for being late. Already merged.

@ghost
Copy link
Author

ghost commented Apr 16, 2024

@seagle0128 thanks for the review and sorry for the nags! I really appreciate the package and the support that you offer for it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants