Geany  dev
Plugin Writing Guidelines

Introduction

The following hints and guidelines are only recommendations. Nobody is forced to follow
them at all.

General notes

Getting a plugin idea

If you want to write a plugin but don't know yet what it should do, have a look at
http://www.geany.org/Support/PluginWishlist to get an idea about what users wish.

Managing the source code

For authors of plugins for Geany, we created a dedicated @a geany-plugins project
on Sourceforge and GitHub to ease development of plugins and help new authors.
All information about this project you can find at http://plugins.geany.org/

To add a new plugin to this project, get in touch with the people on the
geany-devel-mailing list and create a fork of the geany-plugins project
at https://github.com/geany/geany-plugins.
Beside of adding a new plugin, geany-devel-mailing list is also the place where
to discuss development related questions.
However, once you have done your fork of geany-plugins you can develop
your plugin until you think its the right time to publish it. At this point,
create a pull request for adding your patch set into the master branch of the main
geany-plugins repository.

Of course, you don't need to use GitHub - any Git is fine. But GitHub
is making it way easier for review, merging and get in touch with you for 
comments.

If you don't want your plugin to be part of the geany-plugins project it is also fine.
Just skip the part about forking geany-plugins and sending a pull request.
In this case it is of course also a good idea to post some kind of announcement
to geany-devel and maybe to the main geany mailing list -- it's up to you.
You can also ask for your plugin to be listed on the http://plugins.geany.org/
website as a third party plugin, helping Geany user to know about your plugin.

At time of writing, there are some plugins already available in the
repositories. Feel free to use any of these plugins as a start for your own,
maybe by copying the directory structure and the autotools files
(Makefile.am, configure.in, ...). Most of the available plugins are also ready for
i18n support, just for reference.

We encourage authors using this service to only commit changes to their
own plugin and not to others' plugins. Instead just send patches to
geany-devel at uvena.de or the plugin author directly.

Installation paths

 - The plugin binary (@c pluginname.so) should be installed in Geany's libdir. This is
   necessary so that Geany can find the plugin.
   An easy way to retrieve Geany's libdir is to use the pkg-config tool, e.g.@code 
   `$PKG_CONFIG --variable=libdir geany`/ geany
   @endcode
 - If your plugin creates other binary files like helper programs or helper libraries,
   they should go into @c $prefix/bin (for programs, ideally prefixed with @a geany),
   additional libraries should be installed in Geany's libdir, maybe in a subdirectory.
 - Plugins should install their documentation files (README, NEWS, ChangeLog, licences and
   other documentation files) into the common documentation directory
   @c $prefix/share/doc/geany-plugins/$pluginname/
 - Translation files should be installed normally into @c $prefix/share/locale. There is no
   need to use Geany's translation directory. To set up translation support properly and
   for additional information, see main_locale_init().
 - Do @a never install anything into a user's home directory like installing
   the plugin binary in @c ~/.config/geany/plugins/.