[Geany-devel] question about templates

Enrico Tröger enrico.troeger at xxxxx
Thu Jul 9 14:25:09 UTC 2009


On Thu, 9 Jul 2009 13:50:10 +0200, Andreas wrote:

>Hi.
>
>On Thu, 9 Jul 2009 00:45:46 +0200
>Enrico Tröger <enrico.troeger at uvena.de> wrote:
>> Nah, "function" is a keyword, not an identifier. The function name
>> instead is indeed an identifier
>> "secondary keywords" (=2) is styled with the keyword style 2
>> (SCE_C_WORD2), so yes, this is intentional even though defined by
>> Scintlla, see below.
>
>Ah, OK. Then we have:
>[keywords] -> primary: get styled as SCE_C_WORD ([styling] -> word)
>[keywords] -> secondary: get styled as SCE_C_WORD2 ([styling] -> word2)
>Right?
>
>In filetypes.haxe there are also "classes" defined under [keywords].
>But they show no styling. If I understand the code in highlighting.c,
>styleset_haxe() correctly, it should be:
>SSM(sci, SCI_SETKEYWORDS, 3, (sptr_t)
>style_sets[GEANY_FILETYPES_HAXE].keywords[2]);

Yes, good catch. Amazing that nobody noticed that earlier. It might
indicate how many users do use Haxe with Geany...:(
I will fix this unless you want to provide a patch?


>Another question:
>I saw that adding some tags-files like gtk216.c.tags or
>standard.css.tags changed the highlighting, e.g. things like "gchar"
>get highlighted in C then. How does that work?

Well, the manual describes it basically:
http://geany.org/manual/#generating-a-global-tags-file

In theory, it should work for Haxe files as well. The generation is
based on the symbol parser, so it will be as good as the files you pass
in when generating the tags file and as good as the Haxe symbol parser
works :). Give it a try and ask if anything is not clear.


>> That all being said, it might still be that the code in
>> parse_cpp_function_at_line() might need some tweaking for Haxe or
>> maybe other places in Geany. I didn't really have a look yet.
>
>Well, parse_cpp_function_at_line() *should* actually work with haxe
>then at first glance. Maybe symbols_get_current_function does something
>wrong? I'll try to debug it ...

Cool, much appreciated.

Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20090709/405c3131/attachment.pgp>


More information about the Devel mailing list