1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-11-22 11:31:30 +01:00

vim: improve linter/fixer config

This commit is contained in:
bretello 2020-11-16 01:47:04 +01:00
parent d86640d248
commit b4f6f4cd40

View File

@ -18,11 +18,14 @@ let g:ale_fixers = {
\ '*': ['remove_trailing_lines', 'trim_whitespace'], \ '*': ['remove_trailing_lines', 'trim_whitespace'],
\ 'bash': ['shfmt'], \ 'bash': ['shfmt'],
\ 'json': ['prettier'], \ 'json': ['prettier'],
\ 'cpp': ['clang-format'],
\ 'css': ['prettier'], \ 'css': ['prettier'],
\ 'html': ['prettier'], \ 'html': ['prettier'],
\ 'markdown': ['prettier'], \ 'markdown': ['prettier'],
\ 'java': ['eclipselsp'],
\ 'yaml': ['prettier'],
\ 'python': ['black', 'isort'], \ 'python': ['black', 'isort'],
\ 'go': ['gofmt', 'goimports'], \ 'go': ['gofmt', "goimports"],
\ 'rust': ['rustfmt'], \ 'rust': ['rustfmt'],
\ "javascript": ["prettier", "eslint"], \ "javascript": ["prettier", "eslint"],
\ "vue": ["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_bandit_options = "-c banditrc"
let g:ale_python_pylint_options = "--rcfile pylintrc --disable=W0511" 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_linter_aliases = {'vue': ['vue', 'javascript']}
let g:ale_linters = { let g:ale_linters = {
\ 'bash': ['bashlint', "shellcheck"], \ 'bash': ['bashlint', "shellcheck"],
\ 'go': ['golangci-lint'],
\ 'python': ['pyls', 'pylint', 'bandit', 'mypy'], \ 'python': ['pyls', 'pylint', 'bandit', 'mypy'],
\ 'go': ['gopls', 'gobuild'],
\ 'rust': ['rustc'], \ 'rust': ['rustc'],
\ 'yaml': ['yamllint'], \ 'yaml': ['yamllint'],
\ 'javascript': ["yarn lint", "eslint", "vls"] \ 'javascript': ["yarn lint", "eslint", "vls"]
\} \}
let g:ack_default_options = " --cc --cpp --shell --python --html --js --vue" 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_quickfix=1
let g:ale_set_loclist=0 let g:ale_set_loclist=0
" let g:ale_open_list = 1 " let g:ale_open_list = 1