diff options
| author | mitermayer <mitermayer.reis@gmail.com> | 2017-11-08 11:03:57 -0800 |
|---|---|---|
| committer | mitermayer <mitermayer.reis@gmail.com> | 2017-11-08 11:03:57 -0800 |
| commit | 9d7c7816aac01662e2e70f0e2c63537dbb3d3d53 (patch) | |
| tree | f724f55bde67eab1f3f9d89143057a1801caf477 /doc | |
| parent | 8a1da064c3945a24ff2f0354b1e6d1c9942d4f97 (diff) | |
| download | vim-prettier-9d7c7816aac01662e2e70f0e2c63537dbb3d3d53.tar.xz | |
Updating docs
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/prettier.txt | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/doc/prettier.txt b/doc/prettier.txt index 0f46c7c..0b62170 100644 --- a/doc/prettier.txt +++ b/doc/prettier.txt @@ -8,6 +8,7 @@ Author: Mitermayer Reis <mitermayer.reis@gmail.com> WebSite: https://prettier.io/ Repository: https://github.com/prettier/vim-prettier License: MIT style license +Version: 0.2.4 ============================================================================== CONTENTS *vim-prettier-contents* @@ -24,8 +25,6 @@ INTRODUCTION *vim-prettier-introduction* A vim plugin wrapper for prettier, pre-configured with custom default prettier settings. -**Note:** requires `prettier` version 1.7.0+ - 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. @@ -45,10 +44,16 @@ INSTALL *vim-prettier-install* Install with [vim-plug](https://github.com/junegunn/vim-plug), assumes node and yarn|npm installed globally. > - Plug 'prettier/vim-prettier', { - \ 'do': 'yarn install', - \ 'for': ['javascript', 'typescript', 'css', 'less', 'scss', 'json', 'graphql'] } + Plug 'prettier/vim-prettier', { + \ 'do': 'yarn install', + \ 'for': ['javascript', 'typescript', 'css', + \ 'less', 'scss', 'json', 'graphql', 'markdown'] } +< +or simply enable for all formats by: +> + Plug 'prettier/vim-prettier', { 'do': 'yarn install' } < + 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` @@ -110,20 +115,19 @@ First disable the default autoformat, then update to your own custom behaviour Running before saving sync: > let g:prettier#autoformat = 0 - autocmd BufWritePre *.js,*.json,*.css,*.scss,*.less,*.graphql Prettier + autocmd BufWritePre *.js,*.jsx,*.mjs,*.ts,*.tsx,*.css,*.less,*.scss,*.json,*.graphql,*.md Prettier < Running before saving async (vim 8+): > let g:prettier#autoformat = 0 - autocmd BufWritePre *.js,*.json,*.css,*.scss,*.less,*.graphql PrettierAsync + autocmd BufWritePre *.js,*.jsx,*.mjs,*.ts,*.tsx,*.css,*.less,*.scss,*.json,*.graphql,*.md PrettierAsync < Running before saving, changing text or leaving insert mode: > - let g:prettier#autoformat = 0 " when running at every change you may want to disable quickfix let g:prettier#quickfix_enabled = 0 - - autocmd BufWritePre,TextChanged,InsertLeave *.js,*.json,*.css,*.scss,*.less,*.graphql PrettierAsync + let g:prettier#autoformat = 0 + autocmd BufWritePre,TextChanged,InsertLeave *.js,*.jsx,*.mjs,*.ts,*.tsx,*.css,*.less,*.scss,*.json,*.graphql,*.md PrettierAsync < Overwrite default prettier configuration @@ -154,7 +158,7 @@ However they can be configured by: " none|es5|all g:prettier#config#trailing_comma = 'all' - " flow|babylon|typescript|postcss|json|graphql + " flow|babylon|typescript|css|less|scss|json|graphql|markdown g:prettier#config#parser = 'flow' " cli-override|file-override|prefer-file |
