Hi again,
Le 17/09/2010 15:43, ssm2017 a écrit :
[…]
i could see that using the right click mouse button, there is a menu called "insert comments" and inside, there is "insert function description" that is giving me : /*
- name: unknown
- @param
- @return
*/
This one is a default Geany functionality, nothing related to GeanyGenDoc.
cool, but i could use "snippets" for that, i would prefear to see : /*
- name: test
- @param $a
- @return $a
*/
And it's where GeanyGenDoc can help you :) (when configured, see below)
there is also "insert documentation comments" but nothing is happening when using it.
so im not able to use geanygendoc
the doc is containing a list of config options and some example that i can not understand on how to use them, i thought that it was "install and play" :)
Well, the problem you're facing is the lack of default configuration for PHP, because unfortunately nobody wrote it yet.
And yes, the documentation about configuration files is perhaps a bit hard to understand at first glance, I'm sorry... I must try to make it a bit easier to read someday -- but that's difficult when you already know what you're talking about :/
Well, anyway, what you want is a working configuration for PHP, right? So, I'll try to explain a little what you have to do:
I suggest you to start with the C configuration file, so copy it from /usr/share/geany-plugins/geanygendoc/filetypes/c.conf [1], and put it in ~/.config/geany/plugins/geanygendoc/filetypes/php.conf So you have a configuration for PHP -- but it's currently the C one.
You now have to: 1) modify the match_function_arguments regular expression in the settings section, in order to extract the argument list from functions [2]. This is the complex part, because it should work with every possible constructions. 2) in the doctypes list [3], add or modify the settings (if needed). Basically, the Doxygen part should be OK for PHP, apart from missing class support. 3) when you're done, reload the GeanyGenDoc configuration files with Tools -> Documentation Generator -> Reload Configuration Files (or restart Geany) 4) ...it should now work!
BTW, I just wrote a basic PHP configuration file (I join it here) that you can (try to) use and improve if needed. Tell me if/how it works :)
If you have any more questions, please, go ahead :)
Regards, Colomban
PS: it seems there's a strange bug with PHP files that places the documentation at the wrong position for functions if they are indented... :/ I'll take a look at this.
[1] or from the SVN if it's also missing from the Ubuntu package...: http://geany-plugins.svn.sourceforge.net/viewvc/geany-plugins/trunk/geanygen...
[2] Yes, that's a sad implementation detail, but it's needed (at least for now, hopefully it could be done automatically someday)
[3] Each doctype represents the rules to follow in order to generate the documentation for each symbol. Basically, see it as the output format -- Odxygen, Gtk-Doc, whatever.