rescript-lang / rescript-vscode

Official VSCode plugin for ReScript
MIT License
329 stars 56 forks source link

Emmet support for JSX #286

Open l2dy opened 3 years ago

l2dy commented 3 years ago

Is it possible to get Emmet support in ReScript JSX? https://code.visualstudio.com/docs/editor/emmet

cristianoc commented 3 years ago

I think @chenglou added some snippets -- not sure if using Emmet.

amiralies commented 3 years ago

This is not related to rescript-vscode. You have to enable emmet for rescript file type. take a look at here. based on that you have to put something like this in your config file.

"emmet.includeLanguages": {
    "rescript": "javascriptreact"
}
l2dy commented 3 years ago

Emmet has no knowledge of these new languages, and so there might be Emmet suggestions showing up in non HTML/CSS contexts.

Is it possible to improve the experience? Emmet completions are popping out wherever I type if I add rescript to emmet.includeLanguages.

amiralies commented 3 years ago

I'm not sure if we can improve this from rescript side. Are you aware of other language plugins doing this?

l2dy commented 3 years ago

I'm not sure if we can improve this from rescript side. Are you aware of other language plugins doing this?

Yes, Svelte plugin supports Emmet through vscode-emmet-helper.

zth commented 2 years ago

This might be a bit tricky in our setup, but let's think a bit about how we could leverage that module.