vimrc: configure ruff-lsp
This commit is contained in:
parent
6a31a030ff
commit
a95922c54f
@ -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
|
||||||
|
10
.vim/vimrc
10
.vim/vimrc
@ -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!
|
||||||
|
Loading…
Reference in New Issue
Block a user