emmetio / sublime-text-plugin

The essential toolkit for web-developers
https://emmet.io
MIT License
253 stars 29 forks source link

Do we have `includeLanguages`? #150

Closed Afrowave closed 3 years ago

Afrowave commented 3 years ago

I am testing out React on VSCode and there are is the includeLanguages setting that I looked for in ST and I can't find it.

What needs to be done to make it work? It really makes VSCode shine in this area.

sergeche commented 3 years ago

What this option should do and which options you've tried in ST?

Afrowave commented 3 years ago

Hey @sergeche,

this option is meant to allow a user to include languages where Emmet should look for HTML or CSS like code within the source file.

For example:

Screenshot 2020-12-25 at 20 26 45

This is a javascriptreact file using the CSS-in-JS design feature≥. This is activated in the emmet settings in VSCode under includeLanguages where a user adds javascriptreact to active Emmet in React JS files.

I have added the option:

{
    "js_prefix": true,
}

I am getting <tag></tag> completion, but not the emmet abbreviation options like in the picture above.

sergeche commented 3 years ago

Did you checked Emmet preferences file?

https://github.com/emmetio/sublime-text-plugin/blob/master/Emmet.sublime-settings#L29

Afrowave commented 3 years ago

Yes, I did. There is no jsin the syntax_scopes. But now that you ask, I have added the options:

{
    "js_prefix": true,
    "syntax_scopes": {
        "js": "source.js",
    }
}

It looks like it is working now.

Screenshot 2020-12-25 at 21 01 01