diff --git a/autoload/flake8.vim b/autoload/flake8.vim index 06a1b6b..246e0e0 100644 --- a/autoload/flake8.vim +++ b/autoload/flake8.vim @@ -24,7 +24,7 @@ endfunction "" ** internal ** {{{ -"" warnings +"" warnings let s:displayed_warnings = 0 function s:Warnings() @@ -85,6 +85,8 @@ function! s:Setup() " {{{ call s:DeclareOption('flake8_pyflake_marker', '', '"F>"') call s:DeclareOption('flake8_complexity_marker', '', '"C>"') call s:DeclareOption('flake8_naming_marker', '', '"N>"') + " user identified flake8 config file + call s:DeclareOption('flake8_config_file', '', '') "" setup markerdata @@ -137,7 +139,18 @@ function! s:Flake8() " {{{ " perform the grep itself let &grepformat="%f:%l:%c: %m\,%f:%l: %m" - let &grepprg=s:flake8_cmd + + if s:flake8_config_file != '' + if filereadable(s:flake8_config_file) + let &grepprg=s:flake8_cmd . ' --config=' . s:flake8_config_file + else + echoerr "flake8 config file " . s:flake8_config_file . " not found" + return + endif + else + let &grepprg=s:flake8_cmd + endif + silent! grep! "%" " restore grep settings