rescript-vscode icon indicating copy to clipboard operation
rescript-vscode copied to clipboard

Emmet support for JSX

Open l2dy opened this issue 3 years ago • 6 comments

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

l2dy avatar Jul 09 '21 18:07 l2dy

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

cristianoc avatar Jul 10 '21 06:07 cristianoc

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"
}

amiralies avatar Jul 10 '21 08:07 amiralies

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.

l2dy avatar Jul 10 '21 08:07 l2dy

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

amiralies avatar Jul 10 '21 09:07 amiralies

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.

l2dy avatar Jul 10 '21 12:07 l2dy

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

zth avatar May 05 '22 13:05 zth