[Geany-Devel] Interested making a patch to add QML support
torygaurnier at xxxxx
Tue Sep 17 22:59:17 UTC 2013
I actually prefer C, and since I've been playing with C++ I like it a lot so far. The app I'm working on is actually a C app with a C++ wrapper connecting it to a QML gui.
I didn't realize I'd have to create the lexer myself. Is it possible to use the C lexer that's already in Geany and then work it into the QML file type? The only thing I really want to get working is the symbol list (which would be the ctags thing you refered to if I'm not mistaken, right?).
I'm already writing my QML in Geany, but it would be awesome to be able to see the symbols.
Matthew Brush <mbrush at codebrainz.ca> wrote:
>On 13-09-17 08:02 AM, Tory Gaurnier wrote:
>> I'm interested in making a patch to add QML support to Geany, but
>> I had a few questions. First of all, is anyone else already working
>> this? And if not, if I manage to get it working well would my patch
>> worked into the main Geany code so others could get it also? I've
>> learning programming for a while, but I've never patched or edited
>> anyone else’s code, so I'm not making promises how fast I'd be able
>> get this done, of course from looking at the hacking page it doesn't
>> look to complicated to add support for another language, I just
>> to ask these questions before I even attempted this.
>To answer your questions first; no, no one is working on it AFAIK, and
>if you follow the guidelines and write decent code, yes, I'm sure we
>would include it Geany. I'd rather like to use QML in Geany myself as I
>find QtCreator to be way too big and slow for something so simple (even
>if it's quite nice overall).
>You found probably the most important info already (notes in HACKING
>file), so that's a good start :)
>We use Scintilla for the editing component as you probably know, and
>it seems like no one is working on this, though someone talked on the
>their mailing list about starting to work on one last year. In order
>to get syntax highlighting support for QML, you'll need to code up a
>lexer in C++ (actually very C-like C++) and get it included into
>Scintilla project. With that, we can pull it downstream and integrate
>We use a fork of CTags inside Geany for tag/symbol parsing, so in
>order to have that supported for QML you'll need to code up a parser in
>C and ideally get it included into CTags, but more likely we could just
>pull it into Geany directly first.
>With those two things done, which aren't exactly trivial, but for a
>language like QML, probably aren't super difficult, then you can do the
>stuff in the HACKING file to integrate everything into Geany, which is
>the easiest part.
>> Honestly it'll probably take me longer to figure out how to create
>> submit the patch then it will to actually change the code in the
>Naw, writing the Scintilla lexer and Ctags parser will probably be the
>hardest part as writing lexers and parsers isn't the easiest thing in
>the world (especially in C and C++). The rest is just learning how to
>use the version control system and common knowledge you can find online
>about best practices for making commits and using the tools (in our
>Git, and Mercurial for Scintilla - which is quite similar). If you work
>in features branches, and make small incremental commits, you can go
>back after and re-jigger everything into nice clean patches for Geany
>All that being said, if you aren't a strong C programmer and have no
>interest in becoming one, all of this is probably way too much trouble
>for what it's worth :) Unfortunately adding new proper language support
>to Geany is quite difficult compared to most editors. Alternatively,
>might be able to get reasonable results by re-using existing filetypes
>QML. Check Geany's manual for "custom filetypes" for more info on
>this much easier approach, there's a few existing examples of these
>in Geany's source tree.
>Devel mailing list
>Devel at lists.geany.org
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Devel