[Geany-Users] Defining Functions for Geany “Filetype”

Matthew Brush mbrush at xxxxx
Wed Jan 4 15:15:12 UTC 2017


On 2017-01-04 06:07 AM, Gil Hornung wrote:
> Hi, I am using Geany as my text editor. I have started working on
> snakemake, which, from a syntax point-of-view, is Python with a few
> modifications. Python functions are defined by: def bla:
> bunch_of_code
>
> snakemake adds the definition of "rules" in a similar way: rule bla:
> bunch_of_code
>
> Geany presents in the side bar all the Python functions, but I also
> want it to present all the rules. However, I was not able to find how
> to define the keywords for a function in the file
> geany/filetypes.python (I want to add the keyword rule).
>
> Does anyone have any idea?
>

It's baked into the ctags parser[0]. Adding a new keyword like this 
would require modifying the existing (or adding a new) parser.

Regards,
Matthew Brush

[0]: https://github.com/geany/geany/blob/1.29.0/ctags/parsers/python.c



More information about the Users mailing list