3 homepage: https://github.com/prettier/vim-prettier
5 vim-prettier adds Prettier support for Vim.
8 To update (replacing the current version) run `webi vim-prettier`.
12 > `vim-prettier` is a vim plugin wrapper for prettier, pre-configured with
13 > custom default prettier settings.
15 You'll also need to install [`ALE`](https://webinstall.dev/vim-ale) (part of
16 [`vim-essentials`](https://webinstall.dev/vim-essentials)) or
17 [`syntastic`](https://webinstall.dev/vim-syntastic) first.
19 ### How to install by hand
22 git clone --depth=1 https://github.com/prettier/vim-prettier ~/.vim/pack/plugins/start/vim-prettier
25 ### How to configure your `.vimrc`
28 " don't check syntax immediately on open or on quit
29 let g:syntastic_check_on_open = 1
30 let g:syntastic_check_on_wq = 0
32 " we also want to get rid of accidental trailing whitespace on save
33 autocmd BufWritePre * :%s/\s\+$//e
37 """""""""""""""""""""""""""
38 " Prettier-specific options "
39 """""""""""""""""""""""""""
41 " format as-you-type is quite annoying, so we turn it off
42 let g:prettier#autoformat = 0
44 " list all of the extensions for which prettier should run
45 autocmd BufWritePre .babelrc,.eslintrc,.jshintrc,*.js,*.jsx,*.mjs,*.ts,*.tsx,*.css,*.less,*.scss,*.json,*.graphql,*.md,*.vue,*.yaml,*.html PrettierAsync
48 ### How to install Prettier
59 npm install -g prettier@2