neoclide / coc-python

Python extension for coc.nvim, fork of vscode-python
574 stars 51 forks source link

Conditionally enable tools? #60

Open lorencarvalho opened 5 years ago

lorencarvalho commented 5 years ago

Hi there, love coc-nvim and especially love coc-python. Thank you so much for your excellent work!!

In my daily work, I have many Python projects that each have their own self-contained virtualenv, the latest MPLS works wonderfully with them because they have all of my preferred tools installed (flake8, mypy, etc), however if I have a personal project or if I edit a python file outside of a virtualenv with my tools installed, I am repeatedly prompted to install flake8, mypy. I do not wish to install these into my system python, only in virtualenvs.

Is there some way to universally ignore these prompts when a virtualenv is not activated?

Thanks in advance!!

chemzqm commented 5 years ago

Use folder configuration like VSCode https://github.com/neoclide/coc.nvim/wiki/Using-the-configuration-file#configuration-file-resolve

lorencarvalho commented 5 years ago

This is helpful info but not quite what I'm looking for -- specifically my issue is that if I open neovim without first activate a virtualenv then coc-python obviously can't find any of my tools (flake8, black, etc). I don't mind this, as sometimes I just want to quickly edit a file without activating first, but I get bombarded with prompts asking if I want to install linters. I would love a way to disable that prompt entirely, if such an option exists