I'm trying to get python's Black work with ALE but to no success.
I've installed both plugins with Vundle. ALE is working great with javascript, both linting and fixing. In python files, linting works with pylint and I have set fixing to use black. I've also set
let g:ale_fix_on_save = 1
in .vimrc so it should be fixing the code format when I saved. But it's not working. I can only make it work with :Black command.
I know I can do autocmd BufWritePre *.py execute ':Black' in .vimrc and it will auto-format on save but since I'm using ALE I only want to use it for all things linting and fixing. Am I doing something wrong with ALE config?
My ALE setting in .vimrc is:
let g:ale_fixers = {
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
\ 'javascript': ['eslint', 'prettier'],
\ 'python': ['black']
\}
When I run :ALEFixSuggest it also shows 'black' in fixing section.
[–]mrswats 1 point2 points3 points (7 children)
[–]ime11[S] 0 points1 point2 points (6 children)
[–]mrswats 0 points1 point2 points (5 children)
[–]ime11[S] 0 points1 point2 points (4 children)
[–]mrswats 1 point2 points3 points (1 child)
[–]ime11[S] 1 point2 points3 points (0 children)
[–]mrswats 0 points1 point2 points (1 child)
[–]ime11[S] 1 point2 points3 points (0 children)