vimrc: update ALE linter/fixer settings

This commit is contained in:
surtur 2022-10-30 02:44:44 +01:00
parent 0d76e3a116
commit 703a145d6b
Signed by: wanderer
SSH Key Fingerprint: SHA256:MdCZyJ2sHLltrLBp0xQO0O1qTW9BT/xl5nXkDvhlMCI

@ -213,21 +213,52 @@ let g:ale_hover_to_preview = 1
let g:ale_lsp_suggestions = 1
let g:ale_open_list = 0
let g:ale_keep_list_window_open = 0
let g:ale_list_window_size = 5
let g:ale_lint_on_text_changed = 'normal'
let g:ale_list_vertical = 0
let g:ale_keep_list_window_open = 0 " no
" 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_delay = 1000| " the default being 200
let g:ale_completion_autoimport = 1
let g:ale_linters = { 'go': ['gopls', 'govet', 'golint'],
let g:ale_lint_delay = 300| " the default being 200
let g:ale_linters = {
\ 'go': ['gofumpt', 'govet', 'gofmt', 'golangci-lint', 'gopls'],
\ 'dockerfile': ['hadolint'],
\ 'c': ['clang-format', 'clangd', 'clangtidy', 'cppcheck', 'cquery', 'flawfinder'],
\ 'cpp': ['clang-format', 'g++', 'clang', 'clangd', 'clangtidy', 'cppcheck', 'flawfinder'],
\ 'cs': ['OmniSharp'],
\ 'c': ['clang-format', 'ccls', 'clangd', 'clangtidy', 'cppcheck', 'cquery', 'flawfinder'],
\ 'cpp': ['clang-format','ccls', 'clangd', 'clangtidy', 'cppcheck', 'flawfinder'],
\ 'tf': ['tflint', 'terraform', 'tfsec', 'checkov'] }
let g:ale_fixers = { 'c': ['ccls', 'clang-format', 'clangtidy', 'cppcheck', 'cquery', 'flawfinder'],
\ 'cpp': ['clang-format', 'clangtidy', 'cppcheck', 'flawfinder'],
\ 'go': ['gopls'] }
\ 'hare': ['hare', 'vimls', 'vim-lsp'],
\ 'lua': ['vimls'],
\ 'nix': ['rnix_lsp', 'statix', 'nixpkgs-fmt', 'vimls'],
\ 'python': ['vim-lsp', 'pylint', 'yapf', 'isort'],
\ 'rust': ['analyzer', 'cargo', 'rls', 'vimls'],
\ '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')
" set completeopt=longest,menuone,popuphidden