Neomake virtual environment

324 Views Asked by At

So I'm trying to use pylava with Neomake. The thing is, I want to isolate the needed dependencies for this to happen in an environment named neovim which I've created with conda. This way I don't have to tie the dependencies down to the environment of whatever project I'm working on.

So far my ~/.config/nvim/init.vim is as so

call plug#begin()
   Plug 'neomake/neomake'
   Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
   Plug 'zchee/deoplete-jedi'
   Plug 'davidhalter/jedi-vim'
   Plug 'NLKNguyen/papercolor-theme'
   Plug 'treycucco/vim-monotonic'
   Plug 'jalvesaq/vimcmdline'
call plug#end()

let g:jedi#auto_vim_configuration = 0
let g:jedi#use_tabs_not_buffers = 1
let g:jedi#completions_enabled = 0
let g:deoplete#enable_at_startup = 1
let g:python3_host_prog = '/home/severo/miniconda3/envs/neovim/bin/python'
let g:neomake_open_list = 2
call neomake#config#set('ft.python.pylama.exe', 'pylava')
call neomake#configure#automake('nrw', 100)

Problem is that it simply doesn't work. The python binary being used is the system one in /user/bin/python.

Am I missing something?

1

There are 1 best solutions below

0
On

Managed to get it to work by adding the following to init.vim

let g:neomake_python_enabled_makers = ['pylama']
let g:neomake_python_pylama_maker = {
        \ 'args': ['--format', 'parsable'],
        \ 'errorformat': '%f:%l:%c: [%t] %m',
        \ 'postprocess': function('neomake#makers#ft#python#PylamaEntryProcess'),
        \ 'output_stream': 'stdout',
        \ 'exe': '/home/severo/miniconda3/envs/neovim/bin/pylava'
        \ }