From a41f8de91ae3d235a4760d6b515e14f9e2fa7554 Mon Sep 17 00:00:00 2001 From: Aaron Arinder Date: Mon, 18 Oct 2021 11:00:40 -0400 Subject: [PATCH] readme: example config: autoformat on save without pragma --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 69d8fae..d56a1ea 100644 --- a/README.md +++ b/README.md @@ -176,6 +176,13 @@ Allow auto formatting for files without "@format" or "@prettier" tag let g:prettier#autoformat_require_pragma = 0 ``` +**NOTE** The previous two options can be used together for autoformatting files on save without `@format` or `@prettier` tags + +```vim +let g:prettier#autoformat = 1 +let g:prettier#autoformat_require_pragma = 0 +``` + Toggle the `g:prettier#autoformat` setting based on whether a config file can be found in the current directory or any parent directory. Note that this will override the `g:prettier#autoformat` setting! ```vim