svipas / vscode-prettier-plus

Prettier (code formatter) for the VS Code.

Home Page:https://marketplace.visualstudio.com/items?itemName=svipas.prettier-plus

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ruby plugin not formatting

udfalkso opened this issue · comments

commented
/Users/udi/HTML/soundprint/web/app/controllers/editable_pages_controller.rb (3/24/2020, 10:52:47 PM):
-----------------------------------------------------------------------------------------------------
Using prettier@1.19.1 to format code with ruby parser for ruby language.

/Users/udi/HTML/soundprint/web/app/controllers/editable_pages_controller.rb (3/24/2020, 10:52:48 PM):
-----------------------------------------------------------------------------------------------------
undefined

I did a yarn add @prettier/plugin-ruby in the ~/.vscode/extensions/svipas.prettier-plus-3.6.6/ is there anything else I need to do to set this up?

For JS it works great (I see Using prettier@1.19.1 to format code with babel parser for javascript language. instead of this undefined)

Thanks!!

Hi, could you please try to install it locally or globally and then restart VS Code?

Also, you need to install it in the repository you want to use Ruby formatting, not in the extension directory.

commented

Ok I installed it every place and way I can think of at this point:

  • npm install -g @prettier/plugin-ruby
  • yarn add @prettier/plugin-ruby in the ~/.vscode/extensions/svipas.prettier-plus-3.6.6/ directory
  • yarn add @prettier/plugin-ruby in the root directory of the project/repository I'm working on.

Is there something I'm missing? You say "locally or globally" but what exactly does this mean? Locally where? Globally how?

I still just see "undefined" when it runs. Is there a log or something where I can perhaps debug this further? Thanks so much for investigating.

Locally or globally with yarn or npm, in your root project or using for e.g. yarn global add ...

Did you tried to restart VS Code after doing all this?

You can see the output of plugin by pressing Prettier+ at the status bar.

commented

Yes, I restarted vscode. The output you're describing is where I'm seeing this "undefined". Not much to go on there. I pasted full output in my first note above, it hasn't changed.

Extension version? VS Code version?

commented

VS Code version 1.43.2
Extension version 3.6.6

Thanks!

Please try to reproduce the same problem with 4.0.0 version of extension which contains Prettier 2.0.5 and let me know. If issue still exists, give me info how to correctly reproduce it.

I'm closing this issue because there's no more additional info about this issue and I got no response about how it works with latest version of this extension. If it still doesn't work, please re-open it and give me as much info as possible so I could reproduce it. Thank you.