Syntax highlighting between Gerrit 2 and 3.4

59 views
Skip to first unread message

Dmitry P

unread,
Jul 11, 2024, 10:49:05 AM (11 days ago) Jul 11
to Repo and Gerrit Discussion

So what we had in Gerrit 2 was this:

  • atoms = blue
  • numbers = light grey
  • macros = light blue
  • "strings" = red
  • comments = lighter red
  • modules and functions = some shade of green (I think...)
  • Variables = black
  • Erlang specific atoms for expressions, such as but not limited to: case, fun, end, after, receive = purple

In Gerrit 3 (in 3.4?) we now seem to have highlighting for this:

  • "strings" = blue
  • comments = light grey
  • numbers = light grey
  • Erlang specific atoms for expressions = purple?
  • atoms = lighter blue/grey?

So as you can see, there are at least some differences here and it would be much appreciated if these could be aligned for easier code review in Gerrit 3.

Matthias Sohn

unread,
Jul 11, 2024, 11:04:25 AM (11 days ago) Jul 11
to Dmitry P, Repo and Gerrit Discussion
I think this ship has sailed, 2.16, where the new UI called polygerrit was made the default, was released in 2018.

-Matthias

Dmitry P

unread,
Jul 11, 2024, 2:43:56 PM (11 days ago) Jul 11
to Repo and Gerrit Discussion
Does it mean it's impossible to make syntax highlight as it was in Gerrit 2?

David Åkerman

unread,
Jul 12, 2024, 8:57:52 AM (10 days ago) Jul 12
to Repo and Gerrit Discussion
On Thursday, July 11, 2024 at 8:43:56 PM UTC+2 Dmitry P wrote:
Does it mean it's impossible to make syntax highlight as it was in Gerrit 2?

I would not say it is impossible, but I think you would get a very hard time convincing anyone to merge this to upstream Gerrit.

Other alternatives are creating your own plugin or own internal fork of Gerrit. A plugin would be easier to maintain but this approach assumes there is a way to hook in and change the properties you mention.
I have not looked further into the code that control these properties but it could require quite some work to maintain a fork for this considering Google and the Gerrit community is no stranger to rewriting the whole Gerrit frontend with a new web-framework.

Also interleaved posting should be used here. https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

Best regards,
David

Dmitry P

unread,
Jul 12, 2024, 11:53:52 AM (10 days ago) Jul 12
to Repo and Gerrit Discussion
Thanks, I think we close this topic now
Reply all
Reply to author
Forward
0 new messages