Hello all! Is possible to have syntax highlighting also for HAML and SCSS syntax? I've started using them and the default highlighting is driving me mad!!!
I've surfed around a bit, but I didn't found nothing useful! So I've tried to understand how to add specifications to highlight other languages than the defaults provided with geany, but I have lot of doubts, and my tries do not work...
So these are my questions: someone have done this already? If not, can you help me in adding these specifications?
Thank you, Edoardo Tenani
On 21 March 2011 08:44, Edoardo Tenani edoardo.tenani@gmail.com wrote:
Hello all! Is possible to have syntax highlighting also for HAML and SCSS syntax? I've started using them and the default highlighting is driving me mad!!! I've surfed around a bit, but I didn't found nothing useful! So I've tried to understand how to add specifications to highlight other languages than the defaults provided with geany, but I have lot of doubts, and my tries do not work... So these are my questions: someone have done this already? If not, can you help me in adding these specifications? Thank you, Edoardo Tenani
To add a highlighting for a language it first has to be added to Scintilla which is the editing component that Geany uses. see www.scintilla.org
Cheers Lex
Geany mailing list Geany@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
On Sun, 20 Mar 2011 22:44:20 +0100 Edoardo Tenani edoardo.tenani@gmail.com wrote:
Is possible to have syntax highlighting also for HAML and SCSS syntax? I've started using them and the default highlighting is driving me mad!!!
I've surfed around a bit, but I didn't found nothing useful! So I've tried to understand how to add specifications to highlight other languages than the defaults provided with geany, but I have lot of doubts, and my tries do not work...
So these are my questions: someone have done this already? If not, can you help me in adding these specifications?
If those languages are close to languages already supported, but differing in keywords, then you may be able to make a custom filetype:
http://www.geany.org/manual/index.html#custom-filetypes
Otherwise see the HACKING file.
Regards, Nick
Thanks for the reply... I think that custom files are not enough for my need; infact HAML is similar to HTML ( and has some similarity with YAML ) and SCSS is really similar to CSS, but there are some differences that make impossible to use a custom file type: for example in HAML you use code folding ( like in python ), but the way you specify arguments is too different from every supported type. Or in SCSS you use the CSS syntax ( with little modifications ), but you can nest selectors ( which is something that you cannot do ).
Also with a new lexer all scintilla based editor can have HAML / SCSS highlighting.
This reasons make me think that a new lexer is the best way to achive my objective...
Regards, Edoardo Tenani