Add highlighting for Mustache [$50]

Bug #1390577 reported by Cassidy James Blaede
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GtkSourceView
New
Wishlist
Scratch
New
Undecided
Mario Guerriero

Bug Description

Syntax highlighting for Mustache templates would be very welcome. Other code editors like Atom and Sublime have packages to properly highlight mustache tags, and it's something I miss every day at work when I'm using Scratch.

/usr/share/gtksourceview-3.0/language-specs/html.lang would be a starting point, and there're open source packages for Atom and Sublime that might be useful.

Atom: https://atom.io/packages/language-mustache
Sublime: https://github.com/adamchainz/SublimeHTMLMustache

This would be upstreamable and could benefit users of Gedit and other applications of GtkSourceView.

Tags: bounty

Related branches

Revision history for this message
Robert Roth (evfool) wrote :

Bug reported upstream, as there was no bug on this yet. Usually the cleanest solution (and the ones accepted pretty easy) is to have a complex example file submitted along with the language specification. I have searched, but haven't found, only fairly simple ones. Could you please provide a dummy Mustache template for testing using as many features of Mustache as possible?

Changed in gtksourceview:
importance: Unknown → Medium
status: Unknown → New
Changed in gtksourceview:
importance: Medium → Wishlist
Changed in scratch:
assignee: nobody → Mario Guerriero (mefrio-g)
Revision history for this message
Gero.Bare (gero-bare) wrote :

New language highlight support can be added easily for gtksourceview (thus gedit, scratch, and other editor written using this library).

You need to place your valid language file in this folder:

/home/<user>/.local/share/gtksourceview-3.0/language-specs

If the folders don't exist you can create them

> mkdir -p ~/.local/share/gtksourceview-3.0/language-specs

And move your language

> cp ~/Downloads/mustache.lang ~/.local/share/gtksourceview-3.0/language-specs/

Here is a list of some language specs (Including Mustache)

https://wiki.gnome.org/Projects/GtkSourceView/LanguageDefinitions

Revision history for this message
Danielle Foré (danrabbit) wrote :
summary: - Add highlighting for Mustache
+ Add highlighting for Mustache [$50]
tags: added: bounty
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.