-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
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 following
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", "poetry", "conda", "system",
default_venv_name = "py12"
}
}
end,
}
but it returns
Could not retrieve python path, try :PyLspReloadVenv
Then, if I do :PyLspActivateCondaEnv, then the cond environment is used in lsp, though :checkhealth shows
py_lsp: require("py_lsp.health").check()
py_lsp.nvim Report ~
- ERROR No client attached
- ERROR Setup is incorrect
How am I supposed to change the code to automatically set the conda environment. Thanks in advance.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels