From 81a72cc2d640b050bb31ea163cc1fbf8ae0f2f48 Mon Sep 17 00:00:00 2001 From: vrde Date: Mon, 12 Nov 2018 21:01:30 +0100 Subject: [PATCH] Add more information on how to configure ALE (#5454) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Docs on how to configure Prettier with ALE didn't work out of the box for me, since multiple linters with conflicting configurations were run. This PR invite users to explicitly disable default linters. Fix #5447 - [x] I’ve read the [contributing guidelines](https://github.com/prettier/prettier/blob/master/CONTRIBUTING.md). --- docs/vim.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/vim.md b/docs/vim.md index d445a5cb6..895a29192 100644 --- a/docs/vim.md +++ b/docs/vim.md @@ -71,6 +71,12 @@ let g:ale_fixers = { \} ``` +ALE supports both _linters_ and _fixers_. If you don't specify which _linters_ to run, **all available tools for all supported languages will be run**, and you might get a correctly formatted file with a bunch of lint errors. To disable this behavior you can tell ALE to run only linters you've explicitly configured (more info in the [FAQ](https://github.com/w0rp/ale/blob/ed8104b6ab10f63c78e49b60d2468ae2656250e9/README.md#faq-disable-linters)): + +``` +let g:ale_linters_explicit = 1 +``` + You can then run `:ALEFix` in a JavaScript or CSS file to run Prettier. To have ALE run Prettier on save: