TTCN-3 syntax highlighting in gerrit [message #1838001] |
Fri, 12 February 2021 16:07 |
|
As not only Osmocom but also Eclipse TITAN itself is using gerrit for code review, I think you also might be interested in having TTCN-3 syntax highlighting in gerrit.
gerrit itself uses highlight.js to perform syntax highlighting of many other programming languages, but unfortuantely not for TTCN-3.
I've created a related feature request at https://github.com/highlightjs/highlight.js/issues/2999 and would even be willing to contribute financially to it, in case somebody wants to work on it.
Just thought I'd share this here, in case somebody might already be working on this, to avoid any duplication of work. I woldn't be surprised if this has come up before within Eclipse TITAN developers.
Regards,
Harald
|
|
|
Re: TTCN-3 syntax highlighting in gerrit [message #1838003 is a reply to message #1838001] |
Fri, 12 February 2021 16:40 |
Eclipse User |
|
|
|
Hi Harald,
This is a nice initiative, thank you for raising the idea.
Some time ago, Yann Garcia - as expert from STF 569 - contributed a TTCN lexer to the Rouge ruby package that is used in Gitlab to highlight syntax. You may see the PR on the project, hopefully it may help (I am not allowed to post links, but you may find it by visiting Github, project rouge-ruby/rouge, Pull request 1337)
Also, there are some IDE support packages available at the Tools > Plugins and Extensions page on the official TTCN-3 org website (again, I can't post the direct link) , maybe they could serve as starting point.
|
|
|
|
|
Re: TTCN-3 syntax highlighting in gerrit [message #1838022 is a reply to message #1838021] |
Sat, 13 February 2021 13:34 |
|
Gábor Szalai wrote on Sat, 13 February 2021 13:54Our internal gerrit server has syntax highlight for TTCN and ASN files. I\m trying to find some information about it.
Ah, thanks for mentioning this. Based on my research it would mean that highlight.js would have had to be extended - or some completely other mechanism for syntax highlighting introduced into the gerrit codebase.
In eiter case, it would be great to share with the general public, possibly even contributing it upstream.
The latter would mean that https://gerrit.eclipse.org, https://review.gerrithub.io/(both used by TITAN for many repositories) and also our https://gerrit.osmocom.org/ could benefit from this.
|
|
|
|
|
|
|
|
|
|
Re: TTCN-3 syntax highlighting in gerrit [message #1838795 is a reply to message #1838265] |
Fri, 05 March 2021 08:03 |
|
Matthias Simon wrote on Fri, 19 February 2021 21:23Is highlight.js the only syntax highlighter available in gerrit or is there maybe an option to use another one, say pygments, for example?
i believe the syntax highlighting happens in the client/browser, that's why highlight.js is used.
For the same reason, I don't think you can easily adapt it to use any other tool in any other language.
|
|
|
Powered by
FUDForum. Page generated in 0.06346 seconds