First of all I am very impressed by the excellent work. The online editing experience is very pleasing.
I would like to invest time to build ReasonML support for code sandbox. The basic infrastructure is very well layed out already and I think ReasonML could be integrated quite well.
Please let me know if you think the idea could be benifitial for your project as well as ReasonML.
Some links as background information
official documentation
https://reasonml.github.io/
visual studio code plugin
https://github.com/reasonml-editor/vscode-reasonml
Yep! This is a much wanted feature. I'm starting with a rewrite of the loader system right now, which should make it easier to allow loaders like BuckleScript to exist. I'm planning to finish that this week.
The biggest unknown for me with ReasonML is how we are going to support the syntax in Monaco, vscode extensions are partially convertible to Monaco. So we could handpick the extension to add support to Monaco.
Nice! I could start with the ground work to get the Editor setup with all necessary pieces of the plugin already.
That would be really great. It would help a ton!
Any progress on this? This could really impact ReasonML adoption (and codesandbox!)
Yep, there has been a lot of progress on this. I released the new loader system ~10 days ago, so we are now able to very easily expand our existing templates with eg. ReasonML.
The remaining tasks for ReasonML support are:
Point 1 isn't a lot of work, but point 2 is pretty big. I'm not sure if there has been previous work on this. We can't release ReasonML support if the editor doesn't understand it.
I want to add that @rebornix recently took the Vetur extension and ported it to Monaco (https://github.com/rebornix/monaco-vue). Maybe he has some pointers on how to approach converting https://github.com/reasonml-editor/vscode-reasonml to Monaco.
The major differences between VSCode API and Monaco API are:
I'll write a detailed guidance about how to convert from VSCode extension to Monaco.
That would be really helpful! Thanks a lot 馃槃
Is there any ongoing effort to add vetur to codesandbox?
@lbogdan https://github.com/rebornix/monaco-vue ports Vetur to Monaco, which is used by codesandbox.
There is already a LSP for ocaml https://github.com/freebroccolo/ocaml-language-server , which is used by VSCode-Reason as well. Since it's written in TypeScript, so it can be ported to Monaco the same way as monaco-vue.
After digging into https://github.com/freebroccolo/ocaml-language-server for a while, this task turns out to a bit complex (whcih means it requires more than one day or two to finish) since https://github.com/freebroccolo/ocaml-language-server doesn't have an abstraction of Language Service which can be shared in both local env and browser. One good approach can be tweaking ocam lsp by https://github.com/Microsoft/vscode-css-languageservice/blob/master/src/cssLanguageService.ts#L56 and then we can easily write a Monaco ext for reasonml.
Hi!
Seems ReasonML support is very near 馃帀
Yep, starting to work on it now again!
@CompuIves is there anything I can support you with?
Hi! @CompuIves and sorry for the spam.
Did you plan to continue to work on this feature?
This has been implemented 馃帀馃帀
Most helpful comment
Yep, starting to work on it now again!