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

Prettier auto format on Save not working. #342

Closed
iJKTen opened this issue Mar 20, 2023 · 1 comment
Closed

Prettier auto format on Save not working. #342

iJKTen opened this issue Mar 20, 2023 · 1 comment

Comments

@iJKTen
Copy link

iJKTen commented Mar 20, 2023

Do you want to request a feature or report a bug?
bug

What is the current/expected behavior?
It appears that when I save in nvim prettier does not automatically run. I can manually trigger prettier by <leader>p or running :Prettier. Running echo g:loaded_prettier returns 1 and echo g:prettier#autoformat returns 0.

I have the following in my .vimrc file

let g:prettier#autoformat = 1
let g:prettier#autoformat_require_pragma = 0

I am using Packer as my plugin manager and this is how the plugin is installed

use {
  'prettier/vim-prettier',
  run = 'npm install',
}

What version of vim-prettier are you using - (output of :PrettierVersion) ?
1.0.0-beta

What version of prettier are you using - (output of :PrettierCliVersion) ?
2.8.5^@

What is your prettier executable path - (output of :PrettierCliPath) ?
/users/<name>/dev/folder/node_modules/.bin/prettier

Did this work in previous versions of vim-prettier and/or prettier ?
First time running it.

Thank you so much for taking the time to look into this!

@mitermayer
Copy link
Member

Fixed by #348

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

No branches or pull requests

2 participants