nebulab / erb-formatter-vscode

VSCode extension for ERB::Formatter (Format ERB files with speed and precision)
https://marketplace.visualstudio.com/items?itemName=elia.erb-formatter
MIT License
9 stars 2 forks source link

Share VS Code setup guide #1

Closed kohheepeace closed 2 years ago

kohheepeace commented 2 years ago

First of all, thank you very much for creating this awesome plugin. This is very very helpful for me cause prettier-plugin-erb is not working well.

I had a bit of trouble getting this plugin to work in my environment, please allow me to share the setup guide in this issue.

.vsocde/settings.json

{
  "editor.formatOnSave": true,
...
  "[ruby]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[erb]": {
    "editor.defaultFormatter": "elia.erb-formatter" // 👈 I need to add this line.
  },
...
}

Also please don't forget to add gem 'erb-formatter' in your Gemfile.

Thanks.

kohheepeace commented 2 years ago

Close due to this is not issue but for just sharing tips.

overdrivemachines commented 1 year ago

Thank you for sharing. I wish the author added this to the README.md