diff options
| author | mitermayer <mitermayer.reis@gmail.com> | 2019-09-12 23:54:51 +0000 |
|---|---|---|
| committer | mitermayer <mitermayer.reis@gmail.com> | 2019-09-12 23:58:31 +0000 |
| commit | 7ac46762931442491b13401411a1b4eb65272099 (patch) | |
| tree | 1ad98ac2154d698998fc545014c980d448476d94 /plugin | |
| parent | 758415cc88bbe7144964ef3ad770acd400567e55 (diff) | |
| download | vim-prettier-7ac46762931442491b13401411a1b4eb65272099.tar.xz | |
issues/184-fixing-undo-step - Adding support for require-pragma
- Our previous undo implementation tried to be naive on implementing
require-pragma, and created some undo bugs due to it. This diff enables
us to use the prettier upstream support for require-pragma
- On subsequent PR's we will completetly phase out the previous undo
implementation in favour to this one in order to fix bug https://github.com/prettier/vim-prettier/issues/184
Diffstat (limited to 'plugin')
| -rw-r--r-- | plugin/prettier.vim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugin/prettier.vim b/plugin/prettier.vim index 19b4002..d3bee5a 100644 --- a/plugin/prettier.vim +++ b/plugin/prettier.vim @@ -97,6 +97,9 @@ let g:prettier#config#arrow_parens = get(g:,'prettier#config#arrow_parens', 'avo " default: 'none' let g:prettier#config#trailing_comma = get(g:,'prettier#config#trailing_comma', 'none') +" 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') + " synchronous by default command! -nargs=? -range=% Prettier call prettier#Prettier(g:prettier#exec_cmd_async, <line1>, <line2>, g:prettier#partial_format) |
