From 571d5bc9e042d5ddee59c59ba33f58bf7c8fe77b Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 25 Oct 2019 14:01:19 +0200 Subject: [PATCH] [ADD][VIM] ALE settings for Mypy linter in Python --- vim/.vim/after/ftplugin/python.vim | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/vim/.vim/after/ftplugin/python.vim b/vim/.vim/after/ftplugin/python.vim index 294839b..c3687da 100644 --- a/vim/.vim/after/ftplugin/python.vim +++ b/vim/.vim/after/ftplugin/python.vim @@ -5,7 +5,7 @@ let b:undo_ftplugin.='|unlet b:ale_fixers' let b:ale_linters=[ 'flake8', 'mypy', 'pylint', 'pyls' ] let b:undo_ftplugin.='|unlet b:ale_linters' -"let b:ale_python_pyls_executable='pyls' +" Use pyls inside the python environment if needed let b:ale_python_pyls_auto_pipenv=1 let b:undo_ftplugin.='|unlet b:ale_python_pyls_auto_pipenv' @@ -21,6 +21,13 @@ let b:ale_python_pyls_config={ \ } let b:undo_ftplugin.='|unlet b:ale_python_pyls_config' +" Don't use mypy to check for syntax errors +let b:ale_python_mypy_ignore_invalid_syntax=1 +let b:undo_ftplugin.='|unlet b:ale_python_mypy_ignore_invalid_syntax' +" Use mypy inside the python environment if needed +let b:ale_python_mypy_auto_pipenv=1 +let b:undo_ftplugin.='|unlet b:ale_python_mypy_auto_pipenv' + " Change max length of a line to 88 for this buffer to match black's settings setlocal colorcolumn=88 let b:undo_ftplugin.='|setlocal colorcolumn<'