aboutsummaryrefslogtreecommitdiff
path: root/plugin/prettier.vim
diff options
context:
space:
mode:
authorMitermayer Reis <mitermayer.reis@gmail.com>2017-06-19 21:22:36 -0700
committerGitHub <noreply@github.com>2017-06-19 21:22:36 -0700
commitb21e4f884af5a8355ab34109c954ec36ece87598 (patch)
tree91b2e8bdecd7db08c61dc9f8889353a2a1ed6dbc /plugin/prettier.vim
parent0e0af9c7f91047c5a10a79604e1292a7394731d5 (diff)
parentb55d891d2824f98d9fa6e258f5dba28d6b5ccc3c (diff)
downloadvim-prettier-b21e4f884af5a8355ab34109c954ec36ece87598.tar.xz
Merge pull request #15 from mitermayer/feature/allow-partial-buffer-conversion0.0.7
feature: enabling partial buffer conversion
Diffstat (limited to 'plugin/prettier.vim')
-rw-r--r--plugin/prettier.vim6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugin/prettier.vim b/plugin/prettier.vim
index d728353..207c46c 100644
--- a/plugin/prettier.vim
+++ b/plugin/prettier.vim
@@ -20,7 +20,7 @@ let g:loaded_prettier = 1
" autoformating enabled by default upon saving
let g:prettier#autoformat = get(g:, 'prettier#autoformat', 1)
-" calling :Prettier by default runs synchronous
+" calling :Prettier by default runs synchronous
let g:prettier#exec_cmd_async = get(g:, 'prettier#exec_cmd_async', 0)
" when having formatting errors will open the quickfix by default
@@ -55,10 +55,10 @@ let g:prettier#config#trailing_comma = get(g:,'prettier#config#trailing_comma',
let g:prettier#config#parser = get(g:,'prettier#config#parser', 'flow')
" synchronous by default
-command! Prettier call prettier#Prettier(g:prettier#exec_cmd_async)
+command! -nargs=? -range=% Prettier call prettier#Prettier(g:prettier#exec_cmd_async, <line1>, <line2>)
" prettier async
-command! PrettierAsync call prettier#Prettier(1)
+command! -nargs=? -range=% PrettierAsync call prettier#Prettier(1, <line1>, <line2>)
" map command
if !hasmapto('<Plug>(Prettier)') && maparg('<Leader>p', 'n') ==# ''