vimrc: fix some linter/lsp settings

This commit is contained in:
t14 2024-06-21 12:34:31 +02:00
parent fbad93fa89
commit 2c8b3fe91c
Signed by: wanderer
SSH Key Fingerprint: SHA256:szgNfbjbimyesAS1xfRZ0DY3hcNv9xC9ocRCJjD4Wgg

@ -341,8 +341,8 @@ let g:ale_linters = {
\ 'css': ['vim-lsp'], \ 'css': ['vim-lsp'],
\ 'hare': ['hare', 'vim-lsp'], \ 'hare': ['hare', 'vim-lsp'],
\ 'lua': ['vim-lsp'], \ 'lua': ['vim-lsp'],
\ 'nix': ['rnix_lsp', 'statix', 'nixpkgs-fmt', 'vim-lsp'], \ 'nix': ['nil', 'rnix_lsp', 'alejandra', 'deadnix', 'statix', 'nixpkgs-fmt', 'vim-lsp'],
\ 'python': ['vim-lsp', 'pylint', 'yapf', 'isort'], \ 'python': ['ruff', 'vim-lsp', 'pylint', 'yapf', 'isort'],
\ 'rust': ['analyzer', 'cargo', 'rls', 'vim-lsp'], \ 'rust': ['analyzer', 'cargo', 'rls', 'vim-lsp'],
\ 'sh': ['shellcheck', 'shfmt', 'shell', 'vim-lsp'], \ 'sh': ['shellcheck', 'shfmt', 'shell', 'vim-lsp'],
\ 'bash': ['shellcheck', 'shfmt', 'shell', 'vim-lsp'], \ 'bash': ['shellcheck', 'shfmt', 'shell', 'vim-lsp'],
@ -356,9 +356,9 @@ let g:ale_linters = {
\ } \ }
let g:ale_fixers = { 'c': ['clang-format', 'clangd', 'clangtidy', 'cquery', 'flawfinder'], let g:ale_fixers = { 'c': ['clang-format', 'clangd', 'clangtidy', 'cquery', 'flawfinder'],
\ 'cpp': ['clang-format', 'clangtidy'], \ 'cpp': ['clang-format', 'clangtidy'],
\ 'python': ['nayvy#ale_fixer', 'isort', 'yapf'], \ 'python': ['ruff', 'nayvy#ale_fixer', 'isort', 'yapf'],
\ 'go': ['gofumpt'], \ 'go': ['gofumpt'],
\ 'nix': ['nixpkgs-fmt'], \ 'nix': ['alejandra', 'nixpkgs-fmt'],
\ 'rust': ['rustfmt', 'trim_whitespace', 'remove_trailing_lines'], \ 'rust': ['rustfmt', 'trim_whitespace', 'remove_trailing_lines'],
\ 'vim': ['vint', 'vimls', 'generic'], \ 'vim': ['vint', 'vimls', 'generic'],
\ 'sh': ['shfmt'], \ 'sh': ['shfmt'],
@ -1104,6 +1104,16 @@ if executable('gopls')
\ }) \ })
augroup END augroup END
endif endif
if executable('nil')
augroup lsp_nix
autocmd!
au User lsp_setup call lsp#register_server({
\ 'name': 'nil',
\ 'cmd': {server_info->[&shell, &shellcmdflag, 'nil']},
\ 'allowlist': ['nix'],
\ })
augroup END
endif
if executable('rnix-lsp') if executable('rnix-lsp')
augroup lsp_nix augroup lsp_nix
autocmd! autocmd!