dream
dream copied to clipboard
ocaml-lsp integration
When using ocaml-lsp, html blocks in eml.ml template files cause syntax errors. Is there any integration to make that work, or would the templating have to be implemented as a ppx instead?
There is no integration for this at the moment. The main suggestion is to use .eml.html
files, as in this example, so that the editor doesn't attempt to highlight them as OCaml in the first place. This is what I personally do — the .eml.ml
files are more for tiny apps and examples, in my own usage.
I believe @tmattio was looking into a better integration at one point.
A "live" example of .eml.html
usage can be found in the source code of the online playground.
@joprice You might want to try TyXML's JSX ppx; I wrote up a bit of my reaction/experience after trying a bunch of templating options here, and settled on the JSX ppx quite happily (which does work perfectly with ocaml-lsp).
Thank you for the suggestion. I'd rather not have to deal with two syntaxes and I actually think I prefer the normal tyxml syntax. I'm going to use that for now and see how it goes.