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

De-dupe completion suggestions #843

Closed
bmewburn opened this issue Dec 7, 2019 · 7 comments
Closed

De-dupe completion suggestions #843

bmewburn opened this issue Dec 7, 2019 · 7 comments
Milestone

Comments

@bmewburn
Copy link
Owner

bmewburn commented Dec 7, 2019

Sometimes there are multiple definitions in a workspace for the same type name. An example is when stub definitions are included in the workspace to supplement code that is written in a way that makes it difficult/impossible for static analysis engines to discover (eg Laravel and laravel-ide-helper). Only offer a single completion suggestion per nae in such cases.

@KapitanOczywisty
Copy link
Contributor

This is only for classes, right?

@bmewburn
Copy link
Owner Author

bmewburn commented Dec 7, 2019

Types, functions, constants to start with. I've seen it happen with methods too.

@KapitanOczywisty
Copy link
Contributor

Are you planning to compare parameters/return (for functions) or value (for constants) to merge only the same definitions? Besides user-land collisions there is also #737

@bmewburn
Copy link
Owner Author

bmewburn commented Dec 7, 2019

For completions I'm thinking that it is better to show just a single entry if the insert text is the same but show a doc section for both definitions. For example, with strtr it will always auto complete as strtr(|) even though there is two signatures.

@bmewburn
Copy link
Owner Author

functions, constants, type de-duped in 1.3.3. Leaving open to investigate members.

@KapitanOczywisty
Copy link
Contributor

KapitanOczywisty commented Dec 10, 2019

Will extension select compatible signature by itself? For now it always shows first one.
image

How this work in TypeScript:

Btw. I'm hyped about implementing this for methods too :)

@bmewburn bmewburn added this to the 1.3.7 milestone Jan 5, 2020
@bmewburn
Copy link
Owner Author

bmewburn commented Jan 5, 2020

@KapitanOczywisty , I opened #933 for this.

@bmewburn bmewburn closed this as completed Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants