mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-07 21:24:33 +08:00
Merge pull request #1809 from nrhodes91/readme-global-fixers
Update README with the `*` ft option for the fixers object
This commit is contained in:
@@ -231,12 +231,16 @@ let b:ale_fixers = ['prettier', 'eslint']
|
|||||||
let b:ale_fixers = {'javascript': ['prettier', 'eslint']}
|
let b:ale_fixers = {'javascript': ['prettier', 'eslint']}
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also configure your fixers from vimrc using `g:ale_fixers`, before
|
You can also configure your fixers from vimrc using `g:ale_fixers`, before or
|
||||||
or after ALE has been loaded.
|
after ALE has been loaded. A `*` in place of the filetype will apply the
|
||||||
|
corresponding list of fixers to all filetypes. If a subsequent specific filetype
|
||||||
|
match is found it will be used instead of `*`. Note that using a plain list for
|
||||||
|
`g:ale_fixers` is not supported.
|
||||||
|
|
||||||
```vim
|
```vim
|
||||||
" In ~/.vim/vimrc, or somewhere similar.
|
" In ~/.vim/vimrc, or somewhere similar.
|
||||||
let g:ale_fixers = {
|
let g:ale_fixers = {
|
||||||
|
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
|
||||||
\ 'javascript': ['eslint'],
|
\ 'javascript': ['eslint'],
|
||||||
\}
|
\}
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user