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 `ALE`, [`syntastic`](https://webinstall.dev/vim-syntastic), or
18 ### How to install by hand
21 git clone --depth=1 https://github.com/prettier/vim-prettier ~/.vim/pack/plugins/start/vim-prettier
24 ### How to configure your `.vimrc`
27 " don't check syntax immediately on open or on quit
28 let g:syntastic_check_on_open = 1
29 let g:syntastic_check_on_wq = 0
31 " we also want to get rid of accidental trailing whitespace on save
32 autocmd BufWritePre * :%s/\s\+$//e
36 """""""""""""""""""""""""""
37 " Prettier-specific options "
38 """""""""""""""""""""""""""
40 " format as-you-type is quite annoying, so we turn it off
41 let g:prettier#autoformat = 0
43 " list all of the extensions for which prettier should run
44 autocmd BufWritePre .babelrc,.eslintrc,.jshintrc,*.js,*.jsx,*.mjs,*.ts,*.tsx,*.css,*.less,*.scss,*.json,*.graphql,*.md,*.vue,*.yaml,*.html PrettierAsync
47 ### How to install Prettier
58 npm install -g prettier@2