aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVu Tran <vutran@dropbox.com>2017-06-29 17:38:33 -0700
committerVu Tran <vutran@dropbox.com>2017-06-29 17:38:33 -0700
commit4aee3f12ca03cc56bfe250f2925e035989b6c48f (patch)
treeaaaf31c909a0d49e8f5d3c9fb3cb1118a80a328e
parent416f20a4cae4e58313c1f68d876b69e00ce69d91 (diff)
downloadvim-prettier-4aee3f12ca03cc56bfe250f2925e035989b6c48f.tar.xz
update README with graphql
-rw-r--r--README.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/README.md b/README.md
index 07f0641..076d975 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
A vim plugin wrapper for prettier, pre-configured with custom default prettier settings.
-By default it will auto format **javascript**, **typescript**, **less**, **scss**, **css**, and **json** files that have "@format" annotation in the header of the file.
+By default it will auto format **javascript**, **typescript**, **less**, **scss**, **css**, **json**, and **graphql** files that have "@format" annotation in the header of the file.
![vim-prettier](/media/vim-prettier.gif?raw=true "vim-prettier")
@@ -14,7 +14,7 @@ Install with [vim-plug](https://github.com/junegunn/vim-plug), assumes node and
" post install (yarn install | npm install) then load plugin only for editing supported files
Plug 'mitermayer/vim-prettier', {
\ 'do': 'yarn install',
- \ 'for': ['javascript', 'typescript', 'css', 'less', 'scss', 'json'] }
+ \ 'for': ['javascript', 'typescript', 'css', 'less', 'scss', 'json', 'graphql'] }
```
If using other vim plugin managers or doing manual setup make sure to have `prettier` installed globally or go to your vim-prettier directory and either do `npm install` or `yarn install`
@@ -75,14 +75,14 @@ Running before saving sync:
```vim
let g:prettier#autoformat = 0
-autocmd BufWritePre *.js,*.json,*.css,*.scss,*.less Prettier
+autocmd BufWritePre *.js,*.json,*.css,*.scss,*.less,*.graphql Prettier
```
Running before saving async (vim 8+):
```vim
let g:prettier#autoformat = 0
-autocmd BufWritePre *.js,*.json,*.css,*.scss,*.less PrettierAsync
+autocmd BufWritePre *.js,*.json,*.css,*.scss,*.less,*.graphql PrettierAsync
```
Running before saving, changing text or leaving insert mode:
@@ -92,7 +92,7 @@ Running before saving, changing text or leaving insert mode:
let g:prettier#quickfix_enabled = 0
let g:prettier#autoformat = 0
-autocmd BufWritePre,TextChanged,InsertLeave *.js,*.json,*.css,*.scss,*.less PrettierAsync
+autocmd BufWritePre,TextChanged,InsertLeave *.js,*.json,*.css,*.scss,*.less,*.graphql PrettierAsync
```
### Overwrite default prettier configuration