ncm2 / ncm2-jedi

MIT License
23 stars 11 forks source link

Fix Conda Env by getting the first python interpreter from $PATH #16

Closed Guzzii closed 5 years ago

Guzzii commented 5 years ago

It is good that we can set the python interpreter path via g:ncm2_jedi#environment. But for people like me who regularly work with different python environments, it is not that convenient to change the variable in init.vim file constantly.

When a virtual env or conda env is activated, its python executable path is placed to the first position in $PATH. This change would pick up the first python executable from $PATH, when g:ncm2_jedi#environment is not set. As a result, it should automatically get the completion from the current virtual/conda env.

Let me know your thoughts.

roxma commented 5 years ago

LGTM. Thanks!