PHP Documentation Provider
Hi all,
I am trying to build a plugin with documentation provider for a specific PHP function. This php function has different inline doc where it is used in the user code for different function parameters. For example:
function func($arg1, $arg2) {
//
}
/**
* Inline doc for foo
*
* @param int total count
*/
func('foo', 'call_back');
/**
* Inline doc for bar
*
* @param string name
*/
func('bar', 'call_back2');
another function:
function do_func($arg1) {
//
}
Now, when the user types do_func('foo'), and click ctrl-Q for "do_func", how can IntelliJ displays inline doc for "func('foo'", instead of the doc for do_func function itself?
The official PHP plugin will generate the doc for do_func, and if I try to provide my DocumentationProvider, it is not called by IntelliJ because the official PHP documentation provider is called first, and it provides the doc.
How do I make sure my documentation provider is called first? Or is there any other way to achieve displaying the inline doc of "func"?
Please sign in to leave a comment.
You can tell IntelliJ to run your documentation provider before the standard PHP one by adding the order="first" attribute to the XML element registering your extension.
It works, thanks!
order="first" attribute doesn't work for PhpStorm 2018.1.3. I need my provider to be the very first, but PhpDocumentationProvider goes first.
As I understand that's because it is base language provider, but what should I do to get mine first?