From a95922c54fc4592e24d0fd30f01be17033b6332a Mon Sep 17 00:00:00 2001 From: t14 Date: Thu, 27 Jun 2024 10:49:39 +0200 Subject: [PATCH] vimrc: configure ruff-lsp --- .vim/python.vimrc.vim | 4 ++-- .vim/vimrc | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.vim/python.vimrc.vim b/.vim/python.vimrc.vim index ea852a9..981e672 100644 --- a/.vim/python.vimrc.vim +++ b/.vim/python.vimrc.vim @@ -21,8 +21,8 @@ let g:jedi#smart_auto_mappings = 0 :call extend(g:ale_linters, { \'python': ['ruff', 'flake8'], }) -:call extend(g:ale_fixers, { - \'python': ['ruff_format'], }) +":call extend(g:ale_fixers, { +" \'python': ['ruff_format'], }) " vim-airline let g:airline#extensions#virtualenv#enabled = 1 diff --git a/.vim/vimrc b/.vim/vimrc index b601c66..76a6e2c 100644 --- a/.vim/vimrc +++ b/.vim/vimrc @@ -1105,6 +1105,16 @@ if executable('gopls') \ }) augroup END 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') augroup lsp_nix autocmd!