diff options
| author | mitermayer <mreis@atlassian.com> | 2020-04-27 08:10:57 +1000 |
|---|---|---|
| committer | mitermayer <mreis@atlassian.com> | 2020-04-27 08:10:57 +1000 |
| commit | e12223182a51c85528159cb8baf4339998eb9797 (patch) | |
| tree | 362e8fba738b1bcd5bb4f03a4b6f8ac3097cc852 /plugin | |
| parent | de4c4fc5d879c8d82668e47384f80ff45c1bfb42 (diff) | |
| download | vim-prettier-e12223182a51c85528159cb8baf4339998eb9797.tar.xz | |
issue/232-adding-support-for-prettier-2.x - Adding support for prettier
2.x
- Updating default config
- Adding missing configuration
- Updating yarn lock
- Updating package.json depedencies
Diffstat (limited to 'plugin')
| -rw-r--r-- | plugin/prettier.vim | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/plugin/prettier.vim b/plugin/prettier.vim index f7818dc..32391e2 100644 --- a/plugin/prettier.vim +++ b/plugin/prettier.vim @@ -105,16 +105,21 @@ let g:prettier#config#jsx_bracket_same_line = get(g:,'prettier#config#jsx_bracke " avoid wrapping a single arrow function param in parens " avoid|always -" default: 'avoid' -let g:prettier#config#arrow_parens = get(g:,'prettier#config#arrow_parens', 'avoid') +" default: 'always' +let g:prettier#config#arrow_parens = get(g:,'prettier#config#arrow_parens', 'always') " Print trailing commas wherever possible when multi-line. " none|es5|all -" default: 'none' -let g:prettier#config#trailing_comma = get(g:,'prettier#config#trailing_comma', 'none') +" default: 'es5' +let g:prettier#config#trailing_comma = get(g:,'prettier#config#trailing_comma', 'es5') + +" Define the flavor of line endings +" lf|crlf|cr|all +" defaut: 'lf' +let g:prettier#config#end_of_line = get(g:, 'prettier#config#end_of_line', 'lf') " restrict itself to only format files that contain a special comment @prettier or @format -let g:prettier#config#require_pragma= get(g:, 'prettier#config#require_pragma', 'false') +let g:prettier#config#require_pragma = get(g:, 'prettier#config#require_pragma', 'false') " synchronous by default command! -nargs=? -range=% Prettier call prettier#Prettier(g:prettier#exec_cmd_async, <line1>, <line2>, g:prettier#partial_format) |
