summaryrefslogtreecommitdiff
path: root/plugin/prettier.vim
diff options
context:
space:
mode:
authormitermayer <mitermayer.reis@gmail.com>2017-06-15 21:34:38 -0700
committermitermayer <mitermayer.reis@gmail.com>2017-06-19 21:02:05 -0700
commite93d69afb780ea2035c7ee3a9297ee37575b0b35 (patch)
treed4ea4562957d74c3db93d3068b306bcad0517090 /plugin/prettier.vim
parent8112c1c949a001957a1c31e3edf6a572cf54b456 (diff)
downloadvim-prettier-e93d69afb780ea2035c7ee3a9297ee37575b0b35.tar.xz
feature: enabling partial buffer conversion
- bumping plugin prettier version - minor fix, avoiding unecessary sync formattings when content has not changed - adding support for partial convertion when on visual selection
Diffstat (limited to 'plugin/prettier.vim')
-rw-r--r--plugin/prettier.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugin/prettier.vim b/plugin/prettier.vim
index d728353..ca35c79 100644
--- a/plugin/prettier.vim
+++ b/plugin/prettier.vim
@@ -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') ==# ''