Project

General

Profile

Syntax Highlighting

Added by Marc Richter over 9 years ago

Hi everyone,

I'm a little bit stuck in my efford to improve syntax highlighting in my Redmine instance and hope, you can help. I have two goals I'd like to achieve:

  1. Have more Languages supported for syntax highlighting
  2. Have syntax highlighting in diff view

Have more Languages supported for syntax highlighting

I'm using Redmine 2.6.0, which seems to use CodeRay by default. CodeRay only supports the following syntaxes:

C, C++
Clojure (new)
CSS
Delphi
diff
ERB
Go
Groovy
HAML (new)
HTML
Java
JavaScript
JSON
Lua
PHP
Python
Ruby
Sass
SQL
Taskpaper
XML
YAML

I'm missing Bash/Shell and Django support a lot! Since I do very much with this, I'd like to have these highlighted.

There seems to be an alternative, which aims to implement Textmate's syntax highlighting files, named redmine_ultraviolet , which supports the following:

ANTLR
ASP
ASP vb.NET
ActionScript
Active4D
Active4D Config
Active4D Library
Ada
Apache
AppleScript
BibTeX
Blog — HTML
Blog — Markdown
Blog — Text
Blog — Textile
Bulletin Board
C
C#
C++
CM
CSS
CSS v3 beta
CSV
Cake
ColdFusion
Context Free
D
Diff
DokuWiki
Doxygen
Dylan
Eiffel
Erlang
F-Script
FXScript
Fortran
GTD
GTDalt
Graphviz (DOT)
Greasemonkey
Gri
Groovy
HTML
HTML (ASP)
HTML (ASP.net)
HTML (Active4D)
HTML (Django)
HTML (Mason)
HTML (Rails)
HTML (Tcl)
Haml
Haskell
Inform
Ini
Installer Distribution Script
Io
JSON
Java
Java Properties
JavaScript
Javascript YUI
LaTeX
LaTeX Beamer
LaTeX Log
LaTeX Memoir
Language Grammar
Lex/Flex
Lighttpd
Lilypond
Lisp
Literate Haskell
Logo
Logtalk
Lua
MATLAB
MEL
MIPS Assembler
MacPorts Portfile
Mail
Makefile
Man
Markdown
Mediawiki
Modula-3
MoinMoin
MooTools
Movable Type
MultiMarkdown
NAnt Build File
OCaml
OCamllex
OCamlyacc
Objective-C
Objective-C++
OpenGL
PHP
Pascal
Perl
Plain Text
PmWiki
Postscript
Processing
Prolog
Property List
Prototype & Script.aculo.us (JavaScript)
Prototype & Script.aculo.us (JavaScript) Bracketed
Python
Python (Django)
Qt C++
Quake Style .cfg
R
R Console
Ragel
Rd (R Documentation)
Regular Expression
Regular Expressions (Oniguruma)
Regular Expressions (Python)
Release Notes
Remind
Rez
Ruby
Ruby Experimental
Ruby on Rails
S5 Slide Show
SQL
SQL (Rails)
SSH Config
SWIG
SWeave
Scheme
Scilab
Setext
Shell Script (Bash)
Slate
Smarty
Standard ML
Strings File
TSV
Tcl
TeX
TeX Math
Template Toolkit
Textile
Twiki
Txt2tags
Vectorscript
XHTML 1.0 Strict
XML
XML strict
XSL
YAML
camlp4
iCalendar
jQuery (JavaScript)
mod_perl
qmake Project file
reStructuredText

This includes all I need and more, but I don't get it running with Redmine 2.6.0 on Ubuntu 14.04 :(
Maybe someone has a hint or a link to a little tutorial to get it running?

Have syntax highlighting in diff view

When in Repository tab and opening any file which's syntax is supported, it is highlighted:

When watching a diff, there is no highlighting:

I'd like to have it look like diff view in Phabricator; that is: Marking changed lines and have syntax highlighted:

Is this possible somehow?