vimrc: update ALE linter/fixer settings
This commit is contained in:
parent
0d76e3a116
commit
703a145d6b
55
.vim/vimrc
55
.vim/vimrc
@ -213,21 +213,52 @@ let g:ale_hover_to_preview = 1
|
|||||||
let g:ale_lsp_suggestions = 1
|
let g:ale_lsp_suggestions = 1
|
||||||
|
|
||||||
let g:ale_open_list = 0
|
let g:ale_open_list = 0
|
||||||
let g:ale_keep_list_window_open = 0
|
let g:ale_list_vertical = 0
|
||||||
let g:ale_list_window_size = 5
|
let g:ale_keep_list_window_open = 0 " no
|
||||||
let g:ale_lint_on_text_changed = 'normal'
|
" Show 5 lines of errors (default: 10)
|
||||||
|
let g:ale_list_window_size = 7
|
||||||
|
" Run ale upon opening a file.
|
||||||
|
let g:ale_lint_on_enter = 1
|
||||||
|
" Do not run ale upon changes to the file.
|
||||||
|
" let g:ale_lint_on_text_changed = 'never'
|
||||||
|
let g:ale_lint_on_text_changed = 'always'
|
||||||
|
" Run ale after leaving insert mode.
|
||||||
let g:ale_lint_on_insert_leave = 1
|
let g:ale_lint_on_insert_leave = 1
|
||||||
let g:ale_lint_delay = 1000| " the default being 200
|
let g:ale_lint_delay = 300| " the default being 200
|
||||||
let g:ale_completion_autoimport = 1
|
|
||||||
let g:ale_linters = { 'go': ['gopls', 'govet', 'golint'],
|
let g:ale_linters = {
|
||||||
|
\ 'go': ['gofumpt', 'govet', 'gofmt', 'golangci-lint', 'gopls'],
|
||||||
\ 'dockerfile': ['hadolint'],
|
\ 'dockerfile': ['hadolint'],
|
||||||
|
\ 'c': ['clang-format', 'clangd', 'clangtidy', 'cppcheck', 'cquery', 'flawfinder'],
|
||||||
|
\ 'cpp': ['clang-format', 'g++', 'clang', 'clangd', 'clangtidy', 'cppcheck', 'flawfinder'],
|
||||||
\ 'cs': ['OmniSharp'],
|
\ 'cs': ['OmniSharp'],
|
||||||
\ 'c': ['clang-format', 'ccls', 'clangd', 'clangtidy', 'cppcheck', 'cquery', 'flawfinder'],
|
\ 'hare': ['hare', 'vimls', 'vim-lsp'],
|
||||||
\ 'cpp': ['clang-format','ccls', 'clangd', 'clangtidy', 'cppcheck', 'flawfinder'],
|
\ 'lua': ['vimls'],
|
||||||
\ 'tf': ['tflint', 'terraform', 'tfsec', 'checkov'] }
|
\ 'nix': ['rnix_lsp', 'statix', 'nixpkgs-fmt', 'vimls'],
|
||||||
let g:ale_fixers = { 'c': ['ccls', 'clang-format', 'clangtidy', 'cppcheck', 'cquery', 'flawfinder'],
|
\ 'python': ['vim-lsp', 'pylint', 'yapf', 'isort'],
|
||||||
\ 'cpp': ['clang-format', 'clangtidy', 'cppcheck', 'flawfinder'],
|
\ 'rust': ['analyzer', 'cargo', 'rls', 'vimls'],
|
||||||
\ 'go': ['gopls'] }
|
\ 'sh': ['shellcheck', 'shfmt', 'shell', 'vimls'],
|
||||||
|
\ 'bash': ['shellcheck', 'shfmt', 'shell', 'vimls'],
|
||||||
|
\ 'systemd': ['systemd_analyze', 'systemdlint'],
|
||||||
|
\ 'vim': ['vint', 'vimls', 'vim-lsp'],
|
||||||
|
\ 'tex': ['chktex', 'vimls'],
|
||||||
|
\ 'tf': ['vimls', 'vim-lsp', 'tflint', 'terraform', 'tfsec', 'checkov'],
|
||||||
|
\ 'terraform': ['vimls', 'vim-lsp', 'tflint', 'terraform', 'tfsec', 'checkov'],
|
||||||
|
\ 'yaml': ['yaml-language-server', 'spectral', 'swaglint','yamllint'],
|
||||||
|
\ 'zsh': ['shellcheck', 'shell', 'vimls'],
|
||||||
|
\ }
|
||||||
|
let g:ale_fixers = { 'c': ['clang-format', 'clangd', 'clangtidy', 'cquery', 'flawfinder'],
|
||||||
|
\ 'cpp': ['clang-format', 'clangtidy'],
|
||||||
|
\ 'python': ['nayvy#ale_fixer', 'isort', 'yapf'],
|
||||||
|
\ 'go': ['gofumpt'],
|
||||||
|
\ 'nix': ['nixpkgs-fmt'],
|
||||||
|
\ 'rust': ['rustfmt', 'trim_whitespace', 'remove_trailing_lines'],
|
||||||
|
\ 'vim': ['vint', 'vimls', 'generic'],
|
||||||
|
\ 'sh': ['shfmt'],
|
||||||
|
\ 'bash': ['shfmt'],
|
||||||
|
\ 'yaml': ['yamlfix'],
|
||||||
|
\ }
|
||||||
|
|
||||||
|
|
||||||
if has('patch-8.1.1880')
|
if has('patch-8.1.1880')
|
||||||
" set completeopt=longest,menuone,popuphidden
|
" set completeopt=longest,menuone,popuphidden
|
||||||
|
Loading…
Reference in New Issue
Block a user