Improper color markup on Lua

Bug #1200330 reported by Otto Robba
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
GtkSourceView
New
Wishlist
Scratch
Fix Released
Low
Unassigned

Bug Description

I was testing Scratch as a lua editor (the terminal extension makes it pretty good at that! :D) and I noticed a few oddities. This one is about the color markup in it.

The operators (both boolean and arithmetic), variables, loops, numbers and brackets are all colored the same.

This greatly hinders usability, specially with long, concatenated strings (line 27 on the attached screenshot).

The printscreen shows how it looks on Scratch and how it looks on ZeroBrane, for reference.
I am willing to help properly color the markup but I know nothing of Vala.

Tags: color lua markup
Revision history for this message
Otto Robba (otto-ottorobba) wrote :
description: updated
Revision history for this message
Cameron Norman (cameronnemo) wrote :

It looks like there is simply no syntax highlighting for those elements.

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

Bug reported upstream, as this is not a scratch issue, this should affect gedit too, and everything using gtksourceview.

Changed in scratch:
status: New → Confirmed
Changed in gtksourceview:
importance: Unknown → Wishlist
status: Unknown → New
Revision history for this message
Otto Robba (otto-ottorobba) wrote :

I modified the original lang file for Lua, now it includes proper syntax highlighting for most cases (might be some oddities that escaped my regex powers).

Revision history for this message
Otto Robba (otto-ottorobba) wrote :

Submitted the file upstream - hopefully it will get fixed there soon.
Either way, adding the file to /home/username/.local/share/gtksourceview-3.0/language-specs fixes it, if anyone is in a hurry to use it.

Revision history for this message
Otto Robba (otto-ottorobba) wrote :

I uploaded a patch into upstream, Scratch should get it in the next gtkSourceview update - marking bug as fixed :)

Changed in scratch:
status: Confirmed → Fix Committed
Changed in scratch:
milestone: none → freya-beta2
Changed in scratch:
status: Fix Committed → Fix Released
Cody Garver (codygarver)
Changed in scratch:
importance: Undecided → Low
milestone: freya-beta2 → 2.1
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.