mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-03-03 01:40:17 +00:00
18 lines
599 B
VimL
18 lines
599 B
VimL
""""""""""""""""""""""""""""""""""""
|
|
" Prettier-specific defaults "
|
|
" from webinstall.dev/vim-prettier "
|
|
""""""""""""""""""""""""""""""""""""
|
|
|
|
" Change Log
|
|
"
|
|
" 2023-03-06:
|
|
" - run when filetype matches javascript
|
|
" (e.g. shebang is #!/usr/bin/env node)
|
|
" - remove explicit file extension detection
|
|
" (this now works as expected by default)
|
|
|
|
augroup RunPrettierByFiletype
|
|
" run Prettier not just by file extension, but also if the filetype is detected as javascript or typescript
|
|
autocmd FileType javascript,typescript autocmd BufWritePre <buffer> PrettierAsync
|
|
augroup END
|