VSCode: Color decorators visible in jsx files and not in js files

Viewed 151

I have a weird issue:

In js files if don't have access to the color decorators when there's a color in an attribute, but exactly the same code, if I rename the file to .jsx gets the color picker/decorator:

App.js:

enter image description here

App.jsx:

enter image description here

The languages are correctly detected respectively as 'javascript' and 'javascriptreact'.

The settings.json for that seems to be correct:

"[javascript][javascriptreact]": {
  "editor.colorDecorators": true
}

So I don't understand why javascript gets the decorators and javascriptreact doesn't.

0 Answers
Related