Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show php function documentation upon completion #72

Open
kermorgant opened this issue Sep 25, 2018 · 2 comments
Open

show php function documentation upon completion #72

kermorgant opened this issue Sep 25, 2018 · 2 comments
Labels
enhancement New feature or request

Comments

@kermorgant
Copy link
Contributor

during completion, we rely on phpactor's output to show extra information (such as FQN) for each completion candidate, using company's annotation function.

company provides other ways to give contextual help for each candidate. Here's an extract from its source

meta: The second argument is a completion candidate. Return a (short)
documentation string for it.

doc-buffer: The second argument is a completion candidate. Return a
buffer with documentation for it. Preferably use `company-doc-buffer'. If
not all buffer contents pertain to this candidate, return a cons of buffer
and window start position.

It would be nice to use php's documentation when completion candidates are php functions (maybe using php-mode's php-search-local-documentation function ?)

@kermorgant kermorgant added the enhancement New feature or request label Sep 25, 2018
@MarTango
Copy link
Contributor

I think it would be better to use the candidate's doc-comment to generate the annotation - this way it'll work for user-defined functions as well as built-ins (which are provided by the jetbrains/phpstorm-stubs library)

@kermorgant
Copy link
Contributor Author

@MarTango you mean generate the content for meta, no ? annotation is already used and populated with details from phpactor.

That said, I think what you mention does not exclude what I proposed as I believe phpactor now gives more details for each candidate and we'll know whether the candidate is a native php function or a user defined one (worth a check to be sure).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants