vimrc: configure ruff-lsp

This commit is contained in:
t14 2024-06-27 10:49:39 +02:00
parent 6a31a030ff
commit a95922c54f
Signed by: wanderer
SSH Key Fingerprint: SHA256:szgNfbjbimyesAS1xfRZ0DY3hcNv9xC9ocRCJjD4Wgg
2 changed files with 12 additions and 2 deletions

@ -21,8 +21,8 @@ let g:jedi#smart_auto_mappings = 0
:call extend(g:ale_linters, { :call extend(g:ale_linters, {
\'python': ['ruff', 'flake8'], }) \'python': ['ruff', 'flake8'], })
:call extend(g:ale_fixers, { ":call extend(g:ale_fixers, {
\'python': ['ruff_format'], }) " \'python': ['ruff_format'], })
" vim-airline " vim-airline
let g:airline#extensions#virtualenv#enabled = 1 let g:airline#extensions#virtualenv#enabled = 1

@ -1105,6 +1105,16 @@ if executable('gopls')
\ }) \ })
augroup END augroup END
endif endif
if executable('ruff-lsp')
augroup lsp_ruff
autocmd!
au User lsp_setup call lsp#register_server({
\ 'name': 'ruff-lsp',
\ 'cmd': {server_info->[&shell, &shellcmdflag, 'ruff-lsp']},
\ 'allowlist': ['python'],
\ })
augroup END
endif
if executable('nil') if executable('nil')
augroup lsp_nix augroup lsp_nix
autocmd! autocmd!