The prettier throw a exception when use the decorator.
enviroment: js with babel-env.
Hi @Luobata ,
Thank you for submitting this issue, in order for me to better assist / debug this problem could you please provide me some more info on:
the resolved prettier cli version:
:PrettierCliVersion
the prettier executable path:
:PrettierCliPath
vim prettier version
:PrettierVersion
Other information is the extension of the file you were editing while running that command.
thanks a lot!
Could you also provide me the steps you did in other to encounter this issue ? Also does the prettier CLI for your project works on the file by ‘./node_modules/.bin/prettier yourfile’ ?
Not sure whAt issue you may be facing but worth checking on prettier itself https://github.com/prettier/prettier/issues/759 in the past the flow parser had some issues with decorators
@Luobata are you sure you want to use the flow parser which is the default in vim-prettier, but not the default in prettier?
It's likely that you want to add this to your .vimrc
let g:prettier#config#parser = 'babylon'
I am closing this issue since I cannot reproduce and did not have enough information to do so, please feel free to comment or reopen this issue if you can add some more information around it
@nelsyeung 3q! It work and solve my problem.
@mitermayer thanks for your support and sorry not leave enough information, and the problem was resolved by add
let g:prettier#config#parser = 'babylon'
Most helpful comment
@Luobata are you sure you want to use the flow parser which is the default in vim-prettier, but not the default in prettier?
It's likely that you want to add this to your
.vimrc