First, thanks for the fantastic plugin! ALE is amazing and is an important part of my workflow 鉂わ笍
Second, is it possible to disable fixers on a certain project - like by a directory pattern? I see there is the ale_pattern_options for linting, but not fixing. The use case is I have let g:ale_fix_on_save = 1, which I want for projects by default - but I have a few projects that I don't want fixers to run on because the team has other code styles in place (but I still want the linters to run like normal). Is this possible? If not, could it be added?
You can use g:ale_pattern_options to set any buffer variable, including ale_fixers. You can set b:ale_fix_on_save to 0, or disable the fixers.
" Disable fixers for any file containing 'foo' in its path.
let g:ale_pattern_options = {'foo': {'ale_fixers': []}
See :help g:ale_pattern_options for more information.
@w0rp Awesome, thank you!
just wanted to add here that I was following the ale_enabled section of the docs and setting let g:ale_pattern_options = {'\.min.js$': {'ale_enabled': 0}} based on the project name which didn't work.
The solution in this thread worked for me, but I am not sure why
Most helpful comment
You can use
g:ale_pattern_optionsto set any buffer variable, includingale_fixers. You can setb:ale_fix_on_saveto0, or disable the fixers.See
:help g:ale_pattern_optionsfor more information.