2

First question here out of desperation, After a VScode update on [WSL: Ubuntu] I can't seem to get a ERB formatter/Beautify to work together with HTML Snippets (HTML autofill).

It seems that I have to choose one or the other on my seetings.json

With the following ERB works but not my HTML autofill:

{
  "workbench.colorTheme": "Default Dark+",
  "workbench.statusBar.visible": false,
  "editor.minimap.enabled": false,
  "ruby.rubocop.onSave": true,
  "editor.formatOnSaveTimeout": 5000,
  "editor.formatOnSave": true,
  "files.associations": {
    "*.html.erb": "erb"
  },
  "[jsonc]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  }
}

If I change to the following I get the opposite, HTML autofill works but not ERB:

    "*.html.erb": "HTML"
  }

I followed the following solution but it didn't work How do I auto format Ruby or .erb files in VS Code?

I also have Prettier installed and disabling did not change the problem. What am I doing wrong?

1 Answers1

4

Found a solution adding this to settings.json

"emmet.includeLanguages": {
    "erb": "html",
    "ruby": "html"
  },