Skip to content

Type completion for return value hint #1180

Closed

Description

@BladeMF

In that position:

public function providePrepare(): <>

I should get types as completion. Currently I get keywords (which is also wrong).

Activity

  1. dantleech commented on Jan 17, 2021

    @dantleech
    Collaborator

    image

    works for me?

  2. BladeMF commented on Jan 17, 2021

    @BladeMF
    ContributorAuthor

    A VSCode-only issue then?
    image

  3. dantleech commented on Jan 17, 2021

    @dantleech
    Collaborator

    I think you need to type at least one letter, I don't get a single suggestion at this point.

  4. BladeMF commented on Jan 17, 2021

    @BladeMF
    ContributorAuthor

    Still text suggestions only:
    image

  5. BladeMF commented on Jan 17, 2021

    @BladeMF
    ContributorAuthor

    As opposed to:
    image

  6. dantleech commented on Jan 17, 2021

    @dantleech
    Collaborator

    image

  7. dantleech commented on Jan 18, 2021

    @dantleech
    Collaborator

    Maybe worth checking the language server log in VSCode? maybe it is returning but not completing for another reason?

  8. BladeMF commented on Jan 18, 2021

    @BladeMF
    ContributorAuthor

    Hm, right. Will take a look when I can. Let's leave this open.

  9. przepompownia commented on May 5, 2022

    @przepompownia
    Contributor

    image
    For me, primitive types and void are not present. For some reason function names appear there.
    image

  10. dantleech commented on May 5, 2022

    @dantleech
    Collaborator

    the "culprit" is

    class NameSearcherCompletor extends CoreNameSearcherCompletor implements TolerantCompletor
    which is not telling the difference between a "type" completion and a function/class completion.

    For the docblock work there is now

    which provides the return type suggestions.

    So whateter the solution it should probably use that (and that should filter the results for classes only)

  11. pinned this issue on May 5, 2022
  12. dantleech commented on May 8, 2022

    @dantleech
    Collaborator

    should be fixed in #1558

  13. unpinned this issue on May 8, 2022
  14. przepompownia commented on May 8, 2022

    @przepompownia
    Contributor

    image
    image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions