roxma / nvim-completion-manager

:warning: PLEASE USE https://github.com/ncm2/ncm2 INSTEAD
MIT License
917 stars 49 forks source link

Completion for packages installed in the current virtualenv #136

Closed spwx closed 7 years ago

spwx commented 7 years ago

When you create and activate a Python virtual environment and then install packages in the environment, NCM is unable to provide completion for those packages.

deoplete.nvim + deoplete-jedi are able to provide this functionality. Is there someway to get this to work in NCM?

spwx commented 7 years ago

Looks like this problem is larger than NCM.

roxma commented 7 years ago

When you create and activate a Python virtual environment and then install packages in the environment, NCM is unable to provide completion for those packages.

If you activate virtuanenv before starting nvim, it should work.

bbkane commented 6 years ago

This doesn't seem to work with conda envs. Is there some support I'm missing or perhaps an option to point jedi toward the first python in the PATH? If you prefer, I can open a new issue. Thanks

roxma commented 6 years ago

@bbkane

The jedi completion process in running on g:python3_host_prog. Set it to the correct python path if necessary.

bbkane commented 6 years ago

@roxma, that means I must install neovim, jedi and friends in each environment, correct? And there's no way to use a system python to run ncm to autocomplete a project environment python?

roxma commented 6 years ago

@bbkane

that means I must install neovim, jedi and friends in each environment, correct? And there's no way to use a system python to run ncm to autocomplete a project environment python?

I'm not familiar with conda envs. With envs created by python -m venv, I don't have to install jedi in each virtual env. It seems this is the feature implemented by jedi.

roxma commented 6 years ago

@bbkane

Try pip install --user neovim jedi