I use autopep8 as fixer for ale_fix option. It works when called without any arguments but I don't know how to add arguments for the fixer.
let g:ale_fixers = {
'python': ['autopep8']}
But when used as let g:ale_fixers = {
\'python': ['autopep8 --aggressive']}
It gives the following error:
Error detected while processing function ale#fix#Fix[11]..<SNR>161_GetCallbacks[31]..ale#util#GetFunction:
line 2:
E475: Invalid argument: autopep8 --aggressive
Is this a bug or am I doing it wrongly? Please help.
Yeah, 'autopep' is the name of the fixer to run, not the command. I just added g:ale_python_autopep8_options now so you can set more options.
You should be able to set the following now.
let g:ale_fixers = {'python': ['autopep8']}
let g:ale_python_autopep8_options = '--aggressive'
Thanks
Worps setting
let g:ale_python_autopep8_options = '--aggressive'
Also enforces that comments that are too long, (eg. 120 characters comments) will be automatically wrapped to the next line by autopep8. That is fucking nice.
Most helpful comment
You should be able to set the following now.