[Geany-devel] question about templates

Andreas Mokros am at xxxxx
Thu Jul 9 11:50:10 UTC 2009


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]);
instead of:
SSM(sci, SCI_SETKEYWORDS, 2, (sptr_t)
style_sets[GEANY_FILETYPES_HAXE].keywords[2]);
for it to work, because LexCPP takes &keywords4 = *keywordlists[3] and
styles it with SCE_C_GLOBALCLASS. Seems logical to me, will try that
out ...
Having separately colored classes would be nice.

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?

> 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 ...

--
Mockey



More information about the Devel mailing list