aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitermayer Reis <mitermayer.reis@gmail.com>2021-11-24 15:37:43 +1100
committerGitHub <noreply@github.com>2021-11-24 15:37:43 +1100
commit5e6cca21e12587c02e32a06bf423519eb1e9f1b2 (patch)
tree78a87a42987366388f7176801758ac215b8b17d4
parentb146fdac7117ea2392044a79c0ff0b73a8b9d62e (diff)
parenta41f8de91ae3d235a4760d6b515e14f9e2fa7554 (diff)
downloadvim-prettier-5e6cca21e12587c02e32a06bf423519eb1e9f1b2.tar.xz
Merge pull request #315 from aaronArinder/readme-updated-with-autosave-config
readme: example config: autoformat on save without pragma
-rw-r--r--README.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/README.md b/README.md
index 68a0fc0..8636310 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