[Suggestion] same syntax highlighting colors for VS Code, docs and Forum

I started using VS Code and became a big fan. :smile:

But I am wondering if it would make sense to use the same colors for all official openHAB code.
Right now there are three different color schemes in use.

VS Code

official docs

this forum

// Sun
DateTime         Sunrise_Time          "Sunrise [%1$tH:%1$tM]"            <sunrise>   { channel="astro:sun:home:rise#start" }
DateTime         Sunset_Time           "Sunset [%1$tH:%1$tM]"             <sunset>    { channel="astro:sun:home:set#start" }
DateTime         SunAstroDawn_Time     "Dawn (astro) [%1$tH:%1$tM]"       <sunrise>   { channel="astro:sun:home:astroDawn#start" }
DateTime         SunAstroDusk_Time     "Dusk (astro) [%1$tH:%1$tM]"       <sunset>    { channel="astro:sun:home:astroDusk#start" }

What do you think?

3 Likes

I honestly don’t know how the colors that are shown are chosen. I think the hardest to control will be the forum because I don’t think we actually created a color scheme and are just using PHP which is close enough. There really isn’t much highlighting in the forum as a result. Even with your example above only the Strings are highlighted. To support full highlighting on the forum and the docs is to implement a full Rules DSL syntax model in both places. Given that this is what ultimately failed in ESHD I don’t think this will be an easy task.

There might be more options in the official docs since it seems to have a little more robust highlighting. But of all of these, VSCode has the most knowledge of how the syntax of the code works and so it will always have the most complete syntax highlighting.

I like the idea. I just worry it will be a whole lot of work to make happen.