1
0
mirror of https://github.com/aquatix/dotfiles.git synced 2025-12-06 20:35:11 +01:00

Support ruff as Python linter and fixer

This commit is contained in:
2023-08-21 12:02:57 +02:00
parent 4e0f71bfa5
commit 091bfb91b5
2 changed files with 14 additions and 3 deletions

8
.vimrc
View File

@@ -396,12 +396,14 @@ nmap <leader>= <Plug>(ale_fix)
" Quickly open the loclist to see syntax errors
nmap <leader>; :lopen<CR>
let g:ale_maximum_file_size = 500000 " Don't lint large files (> 500KB), it can slow things down
let g:ale_fixers = {}
"let g:ale_fixers = {}
let g:ale_fixers = { '*': ['remove_trailing_lines', 'trim_whitespace'], }
" Python specific settings
let g:ale_fixers.python = ['isort']
let g:ale_fixers.python = ['isort', 'ruff', 'black']
" JS specific settings
let g:ale_fixers.javascript = ['eslint', 'prettier']
" See VIMHOME/after/ftplugin/python.vim for some pylint configuration, also checking whether a
" See VIMHOME/after/ftplugin/python.vim for some linting configuration, also checking whether a
" project uses Django
" Show errors or warnings in the statusline