Skip to content

Commit

Permalink
Merge pull request #315 from aaronArinder/readme-updated-with-autosav…
Browse files Browse the repository at this point in the history
…e-config

readme: example config: autoformat on save without pragma
  • Loading branch information
mitermayer authored Nov 24, 2021
2 parents b146fda + a41f8de commit 5e6cca2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5e6cca2

Please sign in to comment.