From 62a60503ad2f7c71954a3d90209fcf2c18663f91 Mon Sep 17 00:00:00 2001 From: bretello Date: Mon, 9 Mar 2020 17:54:52 +0100 Subject: [PATCH] vim: improve ale linter/fixers configuration --- my_configs.vim | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/my_configs.vim b/my_configs.vim index 8cd0190..d3a161a 100644 --- a/my_configs.vim +++ b/my_configs.vim @@ -14,8 +14,23 @@ set nowrap set showtabline=2 laststatus=2 " fix statusline " ALE configuration -let g:ale_fixers = { 'python': ['black'] , 'rust': ['rustfmt']} -let g:ale_linters = { 'python': ['pylint'], 'bash': ['bashlint', 'shellcheck'], 'rust': ['rustc'] } +let g:ale_fixers_aliases = {'vue': ['vue', 'javascript']} +let g:ale_fixers = { + \ '*': ['remove_trailing_lines', 'trim_whitespace'], + \ 'python': ['black'], + \ 'rust': ['rustfmt'], + \ "javascript": ["prettier", "eslint"], + \ "vue": ["prettier", "eslint"] +\} +let g:ale_linter_aliases = {'vue': ['vue', 'javascript']} +let g:ale_linters = { + \ 'python': ['pylint'], + \ 'bash': ['bashlint', "shellcheck"], + \ 'rust': ['rustc'], + \ 'yaml': ['yamllint'], + \ 'javascript': ["eslint", "vls"], +\} + let g:ale_lint_on_insert_leave = 1 let g:ale_fix_on_insert_leave = 1 let g:ale_lint_on_text_changed = 1