An extension for telescope.nvim that allows the user to switch Anaconda and Miniconda Environments inside Neovim!
add to require statement in use telescope
use {'nvim-telescope/telescope.nvim',
requires = {
'nvim-lua/plenary.nvim',
'IllustratedMan-code/telescope-conda.nvim'
}}
Set the path to the directory the Anaconda python distribution is located in. Default is $HOME/anaconda3
or $HOME/miniconda3
. So if you installed Anaconda the normal way, this should not have to to be changed.
require('telescope').setup {
extensions = {
conda = {anaconda_path = "/path/to/directory/"}
}
}
By default, setting conda environments will work with the :!
bang commands and non-interactive terminals.
If you want conda evironments to be set for interactive terminals, such as when running :terminal
, or using a repl package like kassio/neoterm
, you will need to disable automatic activation of conda environments using this command.
conda config --set auto_activate_base false
This is due to the fact that :terminal
will run the bashrc config, which alters the $PATH
variable when enabling conda, which messes with the altercations that this package does to the neovim path.
The picker
require'telescope'.extensions.conda.conda{}