diff --git a/.vim/vimrc b/.vim/vimrc index 8641a54..2089841 100644 --- a/.vim/vimrc +++ b/.vim/vimrc @@ -341,8 +341,8 @@ let g:ale_linters = { \ 'css': ['vim-lsp'], \ 'hare': ['hare', 'vim-lsp'], \ 'lua': ['vim-lsp'], - \ 'nix': ['rnix_lsp', 'statix', 'nixpkgs-fmt', 'vim-lsp'], - \ 'python': ['vim-lsp', 'pylint', 'yapf', 'isort'], + \ 'nix': ['nil', 'rnix_lsp', 'alejandra', 'deadnix', 'statix', 'nixpkgs-fmt', 'vim-lsp'], + \ 'python': ['ruff', 'vim-lsp', 'pylint', 'yapf', 'isort'], \ 'rust': ['analyzer', 'cargo', 'rls', 'vim-lsp'], \ 'sh': ['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'], \ 'cpp': ['clang-format', 'clangtidy'], - \ 'python': ['nayvy#ale_fixer', 'isort', 'yapf'], + \ 'python': ['ruff', 'nayvy#ale_fixer', 'isort', 'yapf'], \ 'go': ['gofumpt'], - \ 'nix': ['nixpkgs-fmt'], + \ 'nix': ['alejandra', 'nixpkgs-fmt'], \ 'rust': ['rustfmt', 'trim_whitespace', 'remove_trailing_lines'], \ 'vim': ['vint', 'vimls', 'generic'], \ 'sh': ['shfmt'], @@ -1104,6 +1104,16 @@ if executable('gopls') \ }) augroup END 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') augroup lsp_nix autocmd!