[Geany] Custom filetypes

Lex Trotman elextr at xxxxx
Sun Jun 20 22:29:53 UTC 2010


On 20 June 2010 22:50, spir <denis.spir at gmail.com> wrote:
> Hello,
>
> I have installed geany 0.19 (*) mainly to use the new Custom filetypes feature; but cannot have it work. Below what I did for an Oberon filetype:
>
> * In filetype_extensions.conf: added "Oberon=*.ob;".
>
> * Created a filetype.oberon file with settings adapted from filetype.pascal and the additional followong lines in the [settings] section:
>        tag_parser="pascal"
>        lexer_filetype="pascal"

I think in both cases this should be "Pascal"

> (also tried without quotes)
>
> * Created Oberon-specific data in menu Build/Set Build Commands.
>
> Compilation works, which proves the filetype is taken into account; but syntax highlighting does not at all (all test remains in default style). Help/pointer welcome.
>
> Also, I don't understand the respective roles of these 2 settings. Explanation/pointer welcome. I think there may be a short and clear running example for this new feature.

The lexer_filetype is the name of the parser used to generate the
highlighting in the editor, this parser should be able to parse just
the area around where the user is editing to minimise overhead whilst
editing.  It is part of Scintilla.

The tag_parser is the name of the parser used to generate symbols in
the sidebar, this parser is only run when the file is saved and has to
parse the whole file and create a hierarchical symbol table so its
generally constructed differently to the other one.

Cheers
Lex

>
>
> (*) On debian/ubuntu, one needs to first install intltool instead of preinstalled intltool-debian.
> ________________________________
>
> vit esse estrany ☣
>
> spir.wikidot.com
> _______________________________________________
> Geany mailing list
> Geany at uvena.de
> http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
>



More information about the Users mailing list