Hi list, A while ago Lex and I discussed improving custom filetypes, and the most promising thing was using Lua lexers.
*This is not a clear idea for adding support yet.*
Here follows snippets of the discussion and some new links at the end.
On Thu, 23 Sep 2010 13:39:34 +0100 Nick Treleaven nick.treleaven@btinternet.com wrote:
Some of my current work involves the customers domain specific language (DSL), forcing me to use EMACS since they have a mode for the DSL.
...
- Emacs is way more configurable due to elisp, thats why the mode to
support the DSL was done in Emacs. Of course the requirement to write language support in C/C++ is a tagmanager/Scintilla requirement, but Geany inherits that problem.
I think plugins can lex/highlight a document themselves through Scintilla's APIs, but it may be a bit awkward adapting an existing lexer for use by a plugin only. Although if a plugin wrapper for Scintilla lexers is possible, it would be useful for all lexers Geany doesn't include.
There is a project that uses Lua scripts to lex quite a lot of languages - a plugin using this for Geany might be a good idea.
I don't know Lua but I guess it would be better than having to build a dynamic loadable library from C/C++. Can the GeanyLua plugin do any of this? I've only glanced at it?
GeanyLua is for scripting, I was talking about a Scintilla Lua lexing addon - apparently SciTE now has support for this:
Interesting, I wasn't aware of this. Does it work in Geany?
Geany has no support for it, I haven't looked at how SciTE does it.
Found the original project that does this (the next version of SciTE will have support for this): http://code.google.com/p/scintillua/ http://code.google.com/p/scintillua/wiki/LexerList
Haven't looked at it really but it mentions universal color schemes, so I'll investigate sometime - this could be useful for adding named styles.
Nick