-
Notifications
You must be signed in to change notification settings - Fork 25
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
Configuring lsp-pyright for anaconda #52
Comments
I think you just need this: (setq lsp-pyright-venv-path "/home/sreenivas/anaconda3/envs/colorize") |
I have been thinking about how this might work for some time too. I cooked up this little script that helps me (I'm not a emacs-lisp expect btw but works for me!)
|
@SreenivasVRao Have you tried the pyvenv Emacs package? Then M-x pyvenv-workon to select the conda virtual directory - this is typically how I work. |
Have you tried to set (with-eval-after-load 'lsp-pyright
(progn
(lsp-register-custom-settings
`(("python.pythonPath" "D:/path/to/miniconda3/envs/stringle_pro/python.exe"))))
) I put above code to ((python-mode . ((eval . (with-eval-after-load 'lsp-pyright
(progn
(lsp-register-custom-settings
`(("python.pythonPath" "D:/path/to/miniconda3/envs/stringle_pro/python.exe"))))
))))) |
This is my
pyrightconfig.json
With doom emacs (lsp, pyright, conda, direnv), I'm running into issues getting my pyright path to work.
I think I traced this down to https://github.com/emacs-lsp/lsp-pyright/blob/master/lsp-pyright.el#L159-L176 these two functions. I don't have a
venv
in my path, I'm using anaconda3. It's on a separate partition from my project. (Project is on/media/data/....
while virtualenv is on/home/sreenivas/anaconda3
)I can override the two functions to do the job, but I would like some advice on how to do it in a neater manner.
Now it gives:
The text was updated successfully, but these errors were encountered: