Do you want to request a feature or report a bug?
bug
What is the current/expected behavior?
should format file, instead gives error "Prettier: failed to parse buffer."
it does work if i just use :Prettier
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.14.0
What is your prettier executable path - (output of :PrettierCliPath) ?
prettier
Did this work in previous versions of vim-prettier and/or prettier ?
yes, im not sure why its not working anymore.
here is my .vimrc just in case it helps. I am using macos version 10.13.6
https://gist.github.com/yshuman1/88902bbd6ff4341b9e619a935ce63d62
Thanks for reporting this issue will look into it now and comment in this issue
hi @mitermayer, i think i figured it out. its my bash terminal thats messing it up. for whatever reason the line in my vimrc shell=bash\ --login is causing prettier to break. when i comment it out everything in prettier is fine.
do you see anything here that would be breaking it?
`export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/latest/bin
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home
export PATH=$PATH:$JAVA_HOME/bin
export GOPATH=$HOME/go
export GOROOT="/usr/local/go"
export PATH=$PATH:$GOPATH/bin
export GOBIN=$HOME/go/bin
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
export PATH=$PATH:/usr/local/mysql/bin/
export PATH="$HOME/.cargo/bin:$PATH"
export PATH="/usr/local/opt/python@2/libexec/bin:$PATH"
source ~/.bash_git
source ~/git-completion.bash
source ~/.git-prompt.sh
green="[\033[0;32m]"
blue="[\033[0;34m]"
purple="[\033[0;35m]"
reset="[\033[0m]"
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
source ~/git-prompt.sh
export GIT_PS1_SHOWDIRTYSTATE=1
export PS1="$purple\u$green\$(__git_ps1)$blue \W $ $reset"
export NVM_DIR="/Users/yasin/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
if [ -f '/Users/yasin/google-cloud-sdk/path.bash.inc' ]; then source '/Users/yasin/google-cloud-sdk/path.bash.inc'; fi
if [ -f '/Users/yasin/google-cloud-sdk/completion.bash.inc' ]; then source '/Users/yasin/google-cloud-sdk/completion.bash.inc'; fi
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk
export STUDIO_JDK=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk
launchctl setenv STUDIO_JDK /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk
export PATH="$HOME/.cargo/bin:$PATH"`
Closing this issue for now as you have been unblocked.
I will resume working on vim-prettier in 2 weeks, been very busy at work at this stage as I am about to go on paternity leave in the next 2 weeks.
Will then comment in this issue my findings on further debugging this
thank you and congrats on the new arrival!
I also have a custom shell command, and it prevents :PrettierAsync from working. :Prettier works fine, but async does not. Is there a way around this other than removing our custom shell command?
Most helpful comment
Closing this issue for now as you have been unblocked.
I will resume working on vim-prettier in 2 weeks, been very busy at work at this stage as I am about to go on paternity leave in the next 2 weeks.
Will then comment in this issue my findings on further debugging this