This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 104815 - HAML syntax highlighting
Summary: HAML syntax highlighting
Status: NEW
Alias: None
Product: ruby
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker with 3 votes (vote)
Assignee: issues@ruby
: 113130 (view as bug list)
Depends on:
Reported: 2007-05-25 10:00 UTC by piter
Modified: 2017-07-05 09:26 UTC (History)
1 user (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description piter 2007-05-25 10:00:37 UTC

It would be nice to add syntax highlighting into HAML templates (*.haml)

and ofcourse some code completion :)
Comment 1 Jiri Kovalsky 2007-07-03 14:15:00 UTC
Reassigning this issue to newly created 'ruby' component.
Comment 2 Torbjorn Norbye 2007-08-21 16:48:57 UTC
*** Issue 113130 has been marked as a duplicate of this issue. ***
Comment 3 piter 2007-08-23 10:39:13 UTC

So, when we could expect full HAML support in Netbeans RubyIDE ? :-)
Comment 4 Torbjorn Norbye 2007-08-24 00:32:57 UTC
Hopefully Marcin will take a crack at it!

I just integrated a fix such that goto-view/action works or HAML files (build 3419 and later)
Comment 5 piter 2007-08-29 10:30:20 UTC
Well, Marcin how things going on? :-)
Comment 6 marcin_raczkowski 2007-09-09 10:00:32 UTC
I'm still working on it, i had to get to know netbeans architecture.
I'll try to commit as soon as possible but i have deadline coming soon in my day job (i guess if i would add support
before i started it would really speed up our development but now I'm kinda stuck, i have to finish project, and haml
editing would be really helpfull, but i have to finish project soon and don't have time to work on haml support)

anyway, before end of this month i'm planning to finish haml support :) but anyone else have time and is willing to take
over please free to do so.
Comment 7 piter 2007-10-20 10:05:01 UTC
Hmm, I found that someone working on HAML support for Netbeans:

Maybe you can join together to work on it?
Comment 8 dylanbruzenak 2007-10-22 21:45:43 UTC
That would be me; I didn't even know this issue was here.  Basic syntax highlighting work now for both Haml and Sass.
You need to download the plugin, linked below.

I am going to look at rewriting this using the Lexer APIs rather than Schliemann; after that I can hopefully start
looking at code completion and other goodies, time allowing.  

I'm working on getting the source committed to the Netbeans repository currently; after that I will welcome any
contributions, be they code, bug fixes, or ideas for where to go next.  Did you get any source down, Marcin, or were you
still in the concept stage ?  I'd love to look at what you've got.

I'll repost my announcement:

Get the bits at:

This package provides reasonably complete support for both HAML/SASS parsing, including support for some embedded Ruby
syntax highlighting.  Nothing fancy for code completion or folding yet.

Notable exceptions:
  - filters are not properly supported; contents are picked up and attempted to colorize as standard haml tokens; It
won't hurt anything but can be a bit of an eyesore if you use them a lot.
  - multi-line comments in sass are only picked up as single line comments

New in this version:

- The tilde operator.  I had an old copy of the documentation :(

I expect to put out another update either this weekend or sometime this week.  You can log bugs against it in JIRA and
I'll be monitoring this list.  Please kick the tires and let me know what crawls out. 

Comment 9 jdwyah 2009-01-13 15:03:47 UTC
Happily using the plugin Dylan. Could I request 'Go to Rails Action' support? It doesn't seem to work for .html.haml
files for me. Great work. 
Comment 10 piter 2009-01-13 17:44:32 UTC
It seems that work on this plugin completely stopped. There is no changes since the year. It's sad because HAML is very
popular template system for Ruby.
Comment 11 dylanbruzenak 2009-01-13 18:29:54 UTC
Work has stopped; I've moved out of the Ruby space for the time being. If anyone wants to take the project over I'd be
happy to send the source and help out with any technical questions that I remember the answers to.

- Dylan
Comment 12 Martin Krauskopf 2009-01-13 18:48:06 UTC
Dylan are you planning to get back some day? If not probably reassign this issue to 'issues@ruby' so it is caught by our
Otherwise thanks for the great contribution to the NetBeans a good luck with your new language ;)
Comment 13 dylanbruzenak 2009-01-13 18:58:38 UTC
Unfortunately, it is unlikely that I will return to it. I still love Ruby and Haml, but I don't forsee having the time
in the next few years. And somehow I doubt users will want to wait that long ;)

If someone does end up extending this, it probably needs to be rewritten in a framework a bit more in depth than
Schliemann. There are already some scope issues that would be difficult, if not impossible to solve with that framework.
Not the write tool for the job.

I've tried reassigning; let me know if I need to change something else. I'm not that familiar with this bug system.

Comment 14 theknack 2009-01-26 10:09:59 UTC
I'm mainly concerned about the sass enhancements in the upcoming HAML 2.2 release (mixins, etc.). I'm testing the
development branch and the plugin is almost unusable (it marks a lot of syntax errors) when using the new syntax.

Maybe you could open source the plugin, so the community will continue extending your great job. If not, could you
please send me the source code? I think it'll only require minor changes to adapt it to the new version.
Comment 15 caesar2k 2009-05-17 00:39:40 UTC
Voted for it, I think it's a must. HAML is beaitifully productive, and much better for reading and spotting typos for
embeded Ruby code than XHTML views. 
For XML it's simply perfect. 
Comment 18 Mte90 2014-05-09 11:02:08 UTC
Any news about a native implementation?
the plugin it's not update since 2008 and not highlight the code correctly.
Comment 19 Christian Lenz 2017-07-05 09:26:56 UTC
(In reply to Mte90 from comment #18)
> Any news about a native implementation?
> the plugin it's not update since 2008 and not highlight the code correctly.

Can you attach an example file which will not correct highlighted? For my simple example:

    %h2 Welcome to our site!
    %p= print_information
    = render :partial => "sidebar"

It worked ok. I tried the plugin from the first of september of 2008.