You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for this plugin, it works great. I have a question or feature request:
I installed the plugin, and it autoformats all the different JS projects I am working on, but this is not always my desired behavior, I often create PRs on other projects which don't expect its code to be "prettified" but those become also autoformatted by default.
let g:prettier#autoformat = 0
autocmd BufWritePre *.js,*.jsx,*.mjs,*.ts,*.tsx Prettier
I don't know which is the best workaround or feature request. May it be better if the plugin only format projects with a .prettierrc configuration file?
The text was updated successfully, but these errors were encountered:
If you would like to not have autoformat enabled you should remove this autocmd BufWritePre *.js,*.jsx,*.mjs,*.ts,*.tsx Prettier as that is saying to vim that whenever you intend to save a file it should format it before you do so
The let g:prettier#autoformat = 0 flag is used to control vim-prettier bespoke behaviour of autoformatting files that have the pragma @format on top of it.
Closing this issue, please feel free to reopen this in case the above is not working for you and I will happily try to assist you in finding some solutions!
Thanks for this plugin, it works great. I have a question or feature request:
I installed the plugin, and it autoformats all the different JS projects I am working on, but this is not always my desired behavior, I often create PRs on other projects which don't expect its code to be "prettified" but those become also autoformatted by default.
I don't know which is the best workaround or feature request. May it be better if the plugin only format projects with a
.prettierrc
configuration file?The text was updated successfully, but these errors were encountered: