diff --git a/ale_linters/vim/vint.vim b/ale_linters/vim/vint.vim index 9917f3fe..fb177b92 100644 --- a/ale_linters/vim/vint.vim +++ b/ale_linters/vim/vint.vim @@ -6,6 +6,8 @@ let g:ale_vim_vint_show_style_issues = \ get(g:, 'ale_vim_vint_show_style_issues', 1) let s:warning_flag = g:ale_vim_vint_show_style_issues ? '-s' : '-w' +let s:vint_version = ale#semver#Parse(system('vint --version')) +let s:has_no_color_support = ale#semver#GreaterOrEqual(s:vint_version, [3, 0, 7]) let s:enable_neovim = has('nvim') ? ' --enable-neovim ' : '' let s:format = '-f "{file_path}:{line_number}:{column_number}: {severity}: {description} (see {reference})"' @@ -13,8 +15,8 @@ call ale#linter#Define('vim', { \ 'name': 'vint', \ 'executable': 'vint', \ 'command': 'vint ' -\ . s:warning_flag -\ . ' --no-color ' +\ . s:warning_flag . ' ' +\ . (s:has_no_color_support ? '--no-color ' : '') \ . s:enable_neovim \ . s:format \ . ' %t',