mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-02-14 09:39:51 +00:00
fix(vim-prettier): add back explicit file extension detection
This commit is contained in:
@@ -6,12 +6,18 @@
|
||||
" Change Log
|
||||
"
|
||||
" 2023-03-06:
|
||||
" - add back explicit file extension detection
|
||||
" (json and markdown at least are not working by default)
|
||||
" 2023-03-05:
|
||||
" - 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 BufWritePre .babelrc,.eslintrc,.jshintrc,*.js,*.jsx,*.mjs,*.ts,*.tsx,*.css,*.less,*.scss,*.json,*.graphql,*.md,*.vue,*.yaml,*.html PrettierAsync
|
||||
|
||||
autocmd FileType javascript,typescript autocmd BufWritePre <buffer> PrettierAsync
|
||||
|
||||
augroup END
|
||||
|
||||
Reference in New Issue
Block a user