diff options
| author | mitermayer <mitermayer.reis@gmail.com> | 2019-09-13 21:38:53 +0000 |
|---|---|---|
| committer | mitermayer <mitermayer.reis@gmail.com> | 2019-09-13 21:38:53 +0000 |
| commit | 3dc6684302ff2749570d938e1d49862db0e2648c (patch) | |
| tree | 2bb00ea13832cd22f23566250ece8c93954a852e /plugin | |
| parent | 7ac46762931442491b13401411a1b4eb65272099 (diff) | |
| download | vim-prettier-3dc6684302ff2749570d938e1d49862db0e2648c.tar.xz | |
issues/184-fixing-undo-step - Removing previous naive implementation of
requirePragma
- This commit ensures that we use `prettier` default way to identify
pragmas for the auto save and remove our previous naive implementation
Diffstat (limited to 'plugin')
| -rw-r--r-- | plugin/prettier.vim | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/plugin/prettier.vim b/plugin/prettier.vim index d3bee5a..aafa7a2 100644 --- a/plugin/prettier.vim +++ b/plugin/prettier.vim @@ -136,3 +136,10 @@ nnoremap <silent> <Plug>(PrettierVersion) :PrettierVersion<CR> nnoremap <silent> <Plug>(PrettierCli) :PrettierCli<CR> nnoremap <silent> <Plug>(PrettierCliVersion) :PrettierCliVersion<CR> nnoremap <silent> <Plug>(PrettierCliPath) :PrettierCliPath<CR> + +augroup Prettier + autocmd! + if g:prettier#autoformat + autocmd BufWritePre *.js,*.jsx,*.mjs,*.ts,*.tsx,*.css,*.less,*.scss,*.json,*.graphql,*.md,*.vue,*.yaml,*.html call prettier#Autoformat() + endif +augroup end |
