flix / highlightjs-flix

Apache License 2.0
1 stars 3 forks source link

Discussion: What should be highlighted? #7

Closed jaschdoc closed 1 year ago

jaschdoc commented 2 years ago

What other things in the language should have special syntax highlighting in addition to what we have now (keywords, literals, defs, classes)?

magnus-madsen commented 2 years ago

Our aim is for "good enough". I think we should browse through https://doc.flix.dev and look for anything obvious. If it looks good then we are done.

magnus-madsen commented 2 years ago

The only things I noticed:

In any case, I think no more than a few more hours on this is what I would expect.

Is it possible to have other color schemes? Where do colors come from?

jaschdoc commented 2 years ago

Is it possible to have other color schemes? Where do colors come from?

I think it's an mdbook related thing. Hopefully, it shouldn't be anymore difficult than overriding a few global css / scss variables.

https://rust-lang.github.io/mdBook/format/theme/syntax-highlighting.html#custom-theme

jaschdoc commented 1 year ago

Leaving this here for later: For literals to have their own color we just need to create css rule in the theme.css file and add a selector in the scope mode for highlight.js https://highlightjs.readthedocs.io/en/latest/css-classes-reference.html