Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autoformat on save does not work on yaml files #245

Closed
raxell opened this issue May 23, 2020 · 1 comment · Fixed by #246
Closed

Autoformat on save does not work on yaml files #245

raxell opened this issue May 23, 2020 · 1 comment · Fixed by #246

Comments

@raxell
Copy link
Contributor

raxell commented May 23, 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 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

@raxell
Copy link
Contributor Author

raxell commented May 24, 2020

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 raxell changed the title Autoformat on save does not work Autoformat on save does not work on yaml files May 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant