-
Notifications
You must be signed in to change notification settings - Fork 12
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
How to automatically use a conda environment? #42
Comments
Hey! First try to use a table instead of a string for the source strategy, so: return {
"HallerPatrick/py_lsp.nvim",
config = function()
require('py_lsp').setup{
opts = {
host_python = "~/opt/anaconda3/envs/py12/bin",
auto_source = true,
language_server = "pyright",
source_strategies = { "conda" },
default_venv_name = "py12"
}
}
end,
} If that not works, could you please check what |
I also pushed some changes so you might want to update this plugin |
Thanks. I updated the plugin and used a table for the source strategies, but basically no change. Let me summarize what I got:
where the last line sometimes (seemingly randomly) changes to
And
|
I am trying to automatically set a conda environment if a
.py
file is opened. I wonder if you can help me out. I tried the followingbut it returns
Then, if I do
:PyLspActivateCondaEnv
, then the cond environment is used inlsp
, though:checkhealth
showsHow am I supposed to change the code to automatically set the conda environment. Thanks in advance.
The text was updated successfully, but these errors were encountered: