From b4f6f4cd40c633d472e193aeabcc1544a567d905 Mon Sep 17 00:00:00 2001 From: bretello Date: Mon, 16 Nov 2020 01:47:04 +0100 Subject: [PATCH] vim: improve linter/fixer config --- my_configs.vim | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/my_configs.vim b/my_configs.vim index 5d2033c..c0f4271 100644 --- a/my_configs.vim +++ b/my_configs.vim @@ -18,11 +18,14 @@ let g:ale_fixers = { \ '*': ['remove_trailing_lines', 'trim_whitespace'], \ 'bash': ['shfmt'], \ 'json': ['prettier'], + \ 'cpp': ['clang-format'], \ 'css': ['prettier'], \ 'html': ['prettier'], \ 'markdown': ['prettier'], + \ 'java': ['eclipselsp'], + \ 'yaml': ['prettier'], \ 'python': ['black', 'isort'], - \ 'go': ['gofmt', 'goimports'], + \ 'go': ['gofmt', "goimports"], \ 'rust': ['rustfmt'], \ "javascript": ["prettier", "eslint"], \ "vue": ["prettier", "eslint"] @@ -30,18 +33,25 @@ let g:ale_fixers = { let g:ale_python_bandit_options = "-c banditrc" let g:ale_python_pylint_options = "--rcfile pylintrc --disable=W0511" +let g:ale_cpp_clang_options = '-std=c++17 -Wall -Wpedantic' +let g:ale_cpp_gcc_options = '-std=c++17 -Wall -Wpedantic' +let g:ale_cpp_cc_options = '-std=c++17 -Wall -Wpedantic' + let g:ale_linter_aliases = {'vue': ['vue', 'javascript']} let g:ale_linters = { \ 'bash': ['bashlint', "shellcheck"], - \ 'go': ['golangci-lint'], \ 'python': ['pyls', 'pylint', 'bandit', 'mypy'], + \ 'go': ['gopls', 'gobuild'], \ 'rust': ['rustc'], \ 'yaml': ['yamllint'], \ 'javascript': ["yarn lint", "eslint", "vls"] \} let g:ack_default_options = " --cc --cpp --shell --python --html --js --vue" +let g:ale_completion_enabled = 1 +let g:ale_completion_autoimport = 1 + let g:ale_set_quickfix=1 let g:ale_set_loclist=0 " let g:ale_open_list = 1