diff options
author | Cody Hiar <cody@hiar.ca> | 2021-01-28 14:04:21 -0700 |
---|---|---|
committer | Cody Hiar <cody@hiar.ca> | 2021-01-28 14:04:21 -0700 |
commit | 447af5f23af12fc06a70c682810e316df0d0237a (patch) | |
tree | 27696e5bfdf416b2455ab8936810c7d250bd1329 /plugin | |
parent | 42ad17b5862c01e14938ac241a5d583bc7226f13 (diff) |
Use Ale for python linting
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/vim-options.vim | 10 |
1 files changed, 6 insertions, 4 deletions
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 <c-w><c-]> <c-w>v<c-]><c-w>T nnoremap <C-w>t :tabnew<CR> "Duplicate current buffer into another tab nnoremap <C-w><C-t> <C-w>v<C-w>T -" Run isort on file -noremap <leader>ei :!isort %<CR> -" Run black on file -noremap <leader>eb :!black %<CR> +"Run Linter +noremap <leader>ei :ALEFix<CR> " Reload a file noremap <leader>ee :e!<CR> " 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' |