[Geany] Looking for plugin API calls...

Lex Trotman elextr at xxxxx
Thu Aug 27 10:51:48 UTC 2009


Hi again,

I'm not an experienced plugin programmer but quick look at the API
shows document _set_filetype which is what you want.

IIRC the markers are supposed to be in line 1, so just get line 1 with
sci_get_line and then parse it yourself is probably simpler.

There has in the past been some discussion about parsing Emacs and VIM
filetype markers to help with the C++ .h file problem but no one was
concerned enough to write the code :-)

Of course I assume these are old .h files and you are using .hpp for
all your new C++ headers which will not only get the filetype right in
Geany but tell humans that they don't need to wrap this header in
extern C { } constructs.

Cheers
Lex

2009/8/27 Lex Trotman <elextr at gmail.com>:
> Hi,
>
> Plugin API documentation is at
>
> http://www.geany.org/manual/reference/
>
> Cheers
> Lex
>
> 2009/8/27 Joerg Desch <jd.vvd at web.de>:
>> Hi all,
>>
>> I'm looking for some API calls within the plugin API. I would like to
>> write a plugin which reads emacs mode-lines. I have some sources where
>> C++ headers uses the extension .h! In this cases I've added a
>>
>> // -*- Mode: C++ -*-
>>
>> to the header.
>>
>> (1) Is it possible to change the document type?
>>
>> (2) Can I get the some informations of the current line? It would be
>> easier to know if a line is within a comment or not. Geany already knows
>> this.
>>
>> Thanks...
>> --
>> Email: Joerg Desch <jd DOT vvd AT web DOT de>
>> _______________________________________________
>> Geany mailing list
>> Geany at uvena.de
>> http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
>>
>



More information about the Users mailing list