-
-
Notifications
You must be signed in to change notification settings - Fork 138
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 not working on save #191
Comments
look for the following text in the README:
In that section there are some options to enable autosaving (the code snippets should be added to the |
Please follow the README instructions as mentioned by @lfarroco If you still got issues feel free to re-open this |
The docs are not clear for me. It took 15 mins to make it works on autosave. It's not easy to understand, that options below must be used together for execute prettier on autosave without "@Format" or "@prettier" tags. let g:prettier#autoformat = 1
let g:prettier#autoformat_require_pragma = 0 Or for autoformating only when you have config file in directory or parent. let g:prettier#autoformat_config_present = 1
let g:prettier#autoformat_require_pragma = 0 |
I agree with @vadimshvetsov . This should be more clear on the readme |
@drjosephliu Please feel free to submit a PR for it we would love contributions! |
Do you want to request a feature or report a bug?
bug
What is the current/expected behavior?
Just installed the plugin and when I save the file, nothing changes. If I do
:Prettier
it then formats my document. I ranecho g:prettier#autoformat
and it returns a1
What version of
vim-prettier
are you using - (output of:PrettierVersion
) ?0.2.7
What version of
prettier
are you using - (output of:PrettierCliVersion
) ?1.18.2
What is your
prettier
executable path - (output of:PrettierCliPath
) ?/Users/jcostanzo/.dotfiles/config/nvim/plugged/vim-prettier/node_modules/.bin/prettier
Did this work in previous versions of vim-prettier and/or prettier ?
This is my first time using this so its unknown
The text was updated successfully, but these errors were encountered: