-
Notifications
You must be signed in to change notification settings - Fork 12
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
WIP: add annotation beside completion candidate #33
Conversation
annotation is directly taken from phpactor's ``info`` key
I can already say there's an issue when one candidate can match several Fully Qualified Names (FQN). if you try to complete Request, you'll see only one candidate for "Request" but the FQN in the annotation can change during completion. |
this removes the call to add-to-list which eliminated duplicates
(interactive (company-begin-backend 'company-phpactor)) | ||
(prefix (company-phpactor--grab-symbol)) | ||
(candidates (all-completions (substring-no-properties arg) (mapcar #'(lambda (suggestion) (plist-get suggestion :name)) (company-phpactor--get-suggestions)))))) | ||
(candidates (all-completions arg (company-phpactor--get-candidates))))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have the impression calling all-completions is useless. Am I wrong about that ?
@MarTango I believe you pushed that, do you remember if there was some use for it ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, no worry. After reading the doc of all-completions
, I understand it filters the candidates given in the second argument by ensuring each one begins with the first one. This seems to be redundant with what phpactor already does.
Given the PR about auto-import contains the same changes, I guess this one should probably be closed. |
Closing this one after merging pr #34 |
Follows reflextions posted here
annotation is directly taken from phpactor's
info
keyI've just written this and have already consumed too much time :-) So this PR probably deserves a review and a bit of testing before merging ;-)