Hi Colomban and all interested parties,
See git://github.com/elextr/geany.git filetype_plugins branch.
Warning, barely tested :)
The question is which paths to use for the filetype plugins, at the moment its absolute, but that isn't suitable in the long run. I suggest looking in "plugins" subdirectory relative to the filetypes files as well as the normal system locations. This means that all the (future :) filetypes plugins don't get loaded each time the plugin manager is opened, which is what happens with plugins in the standard locations. But a filetype can still activate a standard plugin from geany_plugins for eg.
Loaded filetype plugins appear in the plugin manager, so you can deactivate them if you want to, but they can't be reloaded until the filetype is reloaded. Makes sense to me.
There are some nasties because filetypes can be loaded asynchronously while the plugin manager is open, with both using the active_plugins_list (at least). I have currently simply locked out (silently) all file loading whilst the pm is open because it isn't until way into the loading process before the filetype is determined and so the decision to load another filetype is made and plugins may be loaded.
Cheers Lex
PS Colomban and Matthew, no not lexers or parsers :)