Note this branch is *not* a pull request. It is intended purely as a demonstration that using plugins for filetype specific actions can be hidden from the user by autoloading the plugins when the filetype is loaded.
When a suitable plugin is developed (and it looks like indenting will be first) this branch can be updated and applied to master.
On 18 January 2013 19:31, Lex Trotman elextr@gmail.com wrote:
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.
Filetypes only need to list the .so name, searches the user config dir/filedefs/plugins and system config dir/plugins then standard plugin locations. Plugins from the first two locations will not appear in the plugin manager even though they are active.
Cheers Lex