From 447af5f23af12fc06a70c682810e316df0d0237a Mon Sep 17 00:00:00 2001 From: Cody Hiar Date: Thu, 28 Jan 2021 14:04:21 -0700 Subject: Use Ale for python linting --- plugin/vim-options.vim | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'plugin') diff --git a/plugin/vim-options.vim b/plugin/vim-options.vim index a7fc724..0c935d1 100644 --- a/plugin/vim-options.vim +++ b/plugin/vim-options.vim @@ -119,10 +119,8 @@ noremap vT nnoremap t :tabnew "Duplicate current buffer into another tab nnoremap vT -" Run isort on file -noremap ei :!isort % -" Run black on file -noremap eb :!black % +"Run Linter +noremap ei :ALEFix " Reload a file noremap ee :e! " Session saving @@ -265,6 +263,10 @@ endif " Ale "----------------------------------------------------------------------------------------------------------------------- if !empty(glob($EditorDir.'plugged/ale/autoload/ale.vim')) + let g:ale_pattern_options = { + \ '\.py$': {'ale_linters': ['flake8'], 'ale_fixers': ['isort', 'black']}, + \} + let g:ale_lint_on_enter = 0 let g:ale_sign_column_always = 1 let g:ale_lint_on_text_changed = 'never' -- cgit v1.2.3