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

prepends Ignored unknown option: --config-precedence in buffer #73

Closed
jojoyuji opened this issue Oct 31, 2017 · 3 comments
Closed

prepends Ignored unknown option: --config-precedence in buffer #73

jojoyuji opened this issue Oct 31, 2017 · 3 comments

Comments

@jojoyuji
Copy link

jojoyuji commented Oct 31, 2017

When executing :Prettier it prepends Ignored unknown option: --config-precedence in buffer

I'm using vim-prettier 0.2.4
with global prettier version 1.7.4

I believe it's related to #53

@mitermayer
Copy link
Member

Hi @jojoyuji

Could you please confirm that:

  1. Vim prettier version is 0.2.4 by checking output of:
:PrettierVersion
  1. Check that you are really using a prettier CLI with version over 1.7.4 by checking output of:
:PrettierCliVersion
  1. If the above version is not what you expected you can check what is the resolved prettier cli by checking output of:
:PrettierCliPath

Sometimes you may have the global installed prettier version of 1.7.4+ but you may be working on projects that still have the old prettier installed on their package.json and available on their node_modules in that case vim-prettier will resolve that prettier version instead of your global one

@jojoyuji
Copy link
Author

Woah, found the issue!

I had updated my prettier globaly indeed, however I realized that vim-prettier was using my current project's Prettier by running the :PrettierCliPath

Thx @mitermayer for the help.

@jojoyuji
Copy link
Author

jojoyuji commented Jan 3, 2018

Sometimes you may have the global installed prettier version of 1.7.4+ but you may be working on projects that still have the old prettier installed on their package.json and available on their node_modules in that case vim-prettier will resolve that prettier version instead of your global one

hey @mitermayer just wondering here:

isn't

let g:prettier#exec_cmd_path = "~/path/to/cli/prettier"

supposed to override even a local project prettier?

I mean, since you're pretty much setting the path for the bin file itself, it just doesn't feel right...

What you think?

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