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
Do you want to request a feature or report a bug?
Bug
What is the current/expected behavior?
When saving a yaml file with :w I would expect the file to be formatted but it does not seem to work. I tried to set let g:prettier#autoformat_require_pragma = 0 but still the same result.
By using <Leader>p or setting an auto command (e.g. autocmd BufWritePre ...) it works.
What version of vim-prettier are you using - (output of :PrettierVersion) ?
1.0.0-alpha
What version of prettier are you using - (output of :PrettierCliVersion) ?
1.19.1
(Why can't be used the version installed locally to the project? Using a different version than the local one couldn't format files in potentially different ways?)
What is your prettier executable path - (output of :PrettierCliPath) ? $HOME/.vim/plugged/vim-prettier/node_modules/.bin/prettier
Did this work in previous versions of vim-prettier and/or prettier ?
Just installed it
The text was updated successfully, but these errors were encountered:
Ok it is a but, I've updated the first post.
I was only trying in on a yaml file and I just figured out that the automcd only checks for .yaml extension, .yml is missing.
I've submitted a PR to fix this #246
raxell
changed the title
Autoformat on save does not work
Autoformat on save does not work on yaml files
May 24, 2020
Do you want to request a feature or report a bug?
Bug
What is the current/expected behavior?
When saving a
yaml
file with:w
I would expect the file to be formatted but it does not seem to work. I tried to setlet g:prettier#autoformat_require_pragma = 0
but still the same result.By using
<Leader>p
or setting an auto command (e.g.autocmd BufWritePre ...
) it works.What version of
vim-prettier
are you using - (output of:PrettierVersion
) ?1.0.0-alpha
What version of
prettier
are you using - (output of:PrettierCliVersion
) ?1.19.1
(Why can't be used the version installed locally to the project? Using a different version than the local one couldn't format files in potentially different ways?)
What is your
prettier
executable path - (output of:PrettierCliPath
) ?$HOME/.vim/plugged/vim-prettier/node_modules/.bin/prettier
Did this work in previous versions of vim-prettier and/or prettier ?
Just installed it
The text was updated successfully, but these errors were encountered: