Skip to content

Commit a41f8de

Browse files
committed
readme: example config: autoformat on save without pragma
1 parent 0e61e4a commit a41f8de

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,13 @@ Allow auto formatting for files without "@format" or "@prettier" tag
176176
let g:prettier#autoformat_require_pragma = 0
177177
```
178178

179+
**NOTE** The previous two options can be used together for autoformatting files on save without `@format` or `@prettier` tags
180+
181+
```vim
182+
let g:prettier#autoformat = 1
183+
let g:prettier#autoformat_require_pragma = 0
184+
```
185+
179186
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!
180187

181188
```vim

0 commit comments

Comments
 (0)