fable-compiler / repl-legacy

http://fable.io/repl
MIT License
14 stars 10 forks source link

Better syntax highlighting #17

Closed alfonsogarciacaro closed 6 years ago

alfonsogarciacaro commented 6 years ago

Right now we're using Monaco's default syntax highlighting for F# but it's not very good. @Krzysztof-Cieslak I guess Ionide is using a custom one? How is that done, with regular expressions? Can that be adapted to Monaco?

MangelMaxime commented 6 years ago

Ionide is using https://github.com/ionide/ionide-fsgrammar project. And the grammar are added via the package.json file.

I think, I saw something in the Monaco API to add custom syntax support.

MangelMaxime commented 6 years ago

We can't use the ionide-fsgrammar in the REPL.

The library used to parsed the grammar isn't performant enough in the browser and so Monaco is using monarch.

I don't plan to implement another grammar for now. So I think we can close it for now.