Syntax Highlighting

650 views
Skip to first unread message

cbart

unread,
Aug 31, 2010, 4:11:48 PM8/31/10
to Repo and Gerrit Discussion
Hi!

I would like very much to extend gerrit syntax highlighting with
support for CoffeeScript. Can I do that? And if so where can I search
for examples (such as implementation of syntax highlighting for
JavaScript).

Cheers,
Cezary Bartoszuk

Shawn Pearce

unread,
Aug 31, 2010, 4:24:26 PM8/31/10
to cbart, Repo and Gerrit Discussion
On Tue, Aug 31, 2010 at 13:11, cbart <cezaryb...@gmail.com> wrote:
> I would like very much to extend gerrit syntax highlighting with
> support for CoffeeScript. Can I do that? And if so where can I search
> for examples (such as implementation of syntax highlighting for
> JavaScript).

We reuse the syntax highlighter from
http://code.google.com/p/google-code-prettify/. So you want to get
your extension added to that project, and then let me know when its in
SVN so I can pick up an updated version and bring it into Gerrit.

Cezary Bartoszuk

unread,
Sep 7, 2010, 6:48:28 PM9/7/10
to Shawn Pearce, Repo and Gerrit Discussion
Hi,

2010/8/31 Shawn Pearce <s...@google.com>:

CoffeeScript highlighting is in the trunk now:
http://code.google.com/p/google-code-prettify/source/detail?r=114

Cheers,
Cezary Bartoszuk

JT Olds

unread,
Aug 14, 2013, 7:34:30 PM8/14/13
to repo-d...@googlegroups.com, cbart
Looks like google-code-prettify supports multiple languages via extensions? https://code.google.com/p/google-code-prettify/source/browse/trunk/src/ has a big list. My current Gerrit 2.6 installation does not seem to support Go (golang if you're googling this message). What do I have to do to add it?

David Ostrovsky

unread,
Aug 16, 2013, 9:52:44 AM8/16/13
to repo-d...@googlegroups.com

On Thursday, August 15, 2013 1:34:30 AM UTC+2, JT Olds wrote:
Looks like google-code-prettify supports multiple languages via extensions? https://code.google.com/p/google-code-prettify/source/browse/trunk/src/ has a big list. My current Gerrit 2.6 installation does not seem to support Go (golang if you're googling this message). What do I have to do to add it?

prettify is used in old change screen. Is is considered to be deprecated and is going to be removed.
The new syntax highlighting engine is codemirror and is used in change screen 2.
And of course codemirror has support for Go language and what not [1].

We still have to find a way to activate optional codemirror addons or replace sensible defaults like
vim keyboard binding with emacs. Ideally we could configure it per Gerrit site and/or on user preference page.


Nasser Grainawi

unread,
Aug 16, 2013, 11:07:55 AM8/16/13
to David Ostrovsky, repo-d...@googlegroups.com
On Aug 16, 2013, at 7:52 AM, David Ostrovsky wrote:


On Thursday, August 15, 2013 1:34:30 AM UTC+2, JT Olds wrote:
Looks like google-code-prettify supports multiple languages via extensions? https://code.google.com/p/google-code-prettify/source/browse/trunk/src/ has a big list. My current Gerrit 2.6 installation does not seem to support Go (golang if you're googling this message). What do I have to do to add it?

prettify is used in old change screen. Is is considered to be deprecated and is going to be removed.
The new syntax highlighting engine is codemirror and is used in change screen 2.
And of course codemirror has support for Go language and what not [1].

That doesn't help someone running 2.6 though. The version of prettify in 2.6 is a little older, but I don't know if that's the problem. Looks like this change [2] is the last one to have updated it. That picked up the release at r255, the latest release is at r301 [3]. There's instructions in [2] to update from the google code project.



We still have to find a way to activate optional codemirror addons or replace sensible defaults like
vim keyboard binding with emacs. Ideally we could configure it per Gerrit site and/or on user preference page.



--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
 
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

Reply all
Reply to author
Forward
0 new messages