I just started configuring Vim as an IDE, and the first file I launched into was one that happened to use a Virtual Environment.
In my .vimrc, I added ale as my lint engine, and coc as my autocomplete (intellisense) engine. So I entered, and saw there were errors. I exited vim, and then sourced my virtual environment and entered again, and there were still errors. For some reason, though, they were all at the imports.
I've tried:
- Sourcing my venv before entering vim
- Putting
let g:ale_virtualenv_dir_names = ['env']
in my .vimrc - Using the vim-virtualenv plugin
I setup ale's linters and fixers as the following
" ALE vars
let g:ale_disable_lsp = 1
let g:ale_linters = {
\ 'python': ['flake8'],
\ 'javascript': ['eslint'],
\}
let g:ale_fixers = {
\ 'python': ['black'],
\}
let g:ale_fix_on_save = 1
let g:ale_sign_warning = '-!'
let g:ale_virtualenv_dir_names = ['env']
but it still throws the errors
How do I make it warn using my Virtual Environment?