Skip to content

[ES6] Auto imports with completion #7849

Description

@angelozerr

It should really fantastic if tsserver completion command could support auto import with completion like WebStorm provides:

See http://blog.jetbrains.com/webstorm/2016/04/angular-2-workflow-in-webstorm/#ng2-imports for more information.

Activity

  1. angelozerr commented on Oct 26, 2016

    @angelozerr
    Author

    Daniel Rosenwasser (@DanielRosenwasser) Mohamed Hegazy (@mhegazy) is there any chance that tsserver could provide this feature? If yes in which RoadMap? Thanks!

  2. RyanCavanaugh commented on Oct 26, 2016

    @RyanCavanaugh
    Member

    This would be really complex and is unlikely to be a priority relative to other work for quite a while

  3. angelozerr commented on Oct 26, 2016

    @angelozerr
    Author

    Thank's @RyanCavanaughfor your answer. I understand that it's not your priority but a lot of users from VSCode, typescript.java complains about this missing features compared to Jetbrains.

    I know that there are VSCode extension to do that, but it's not clean because there are double TypeScript parsing (one by tsserver and one by the extension). It should be very cool if tsserver provides this feature.

  4. mhegazy commented on Oct 26, 2016

    @mhegazy
    Contributor

    #11768 would handle part of that, though not through completion but through quick fixes.

  5. angelozerr commented on Oct 27, 2016

    @angelozerr
    Author

    Thanks Mohamed Hegazy (@mhegazy) for your answer. #11768 is a great feature. I'm implementing quickfix support inside Eclipse. I'm very enthousiasm to test it once my implementation will be finished.

    Do you think you could use #11768 logic to support auto import with completion?

  6. mhegazy commented on Oct 27, 2016

    @mhegazy
    Contributor

    Do you think you could use #11768 logic to support auto import with completion?

    What i meant is the user would get some of the functionality with the quick fix. possibly we can leverage some of the logic later on to support the feature in the OP.

    the main issue is that we need to have our completion include some sort of edit ranges, so that accepting the completion would generate multiple changes in the file. which is not that hard to do to be frank, bit it is work.

  7. angelozerr commented on Oct 27, 2016

    @angelozerr
    Author

    Thanks again Mohamed Hegazy (@mhegazy) to have taking time to answer me.

    What i meant is the user would get some of the functionality with the quick fix.

    Yes it's already a great improvement.

    possibly we can leverage some of the logic later on to support the feature in the OP.

    It was the answer that I wished:) Hope one day auto import will be implemented.

    the main issue is that we need to have our completion include some sort of edit ranges, so that accepting the completion would generate multiple changes in the file. which is not that hard to do to be frank, bit it is work.

    Ok I understand. I though the hard task was about the scan files (to have the best performance), because in this case you must scan about the whole ts files in the project and not only declared files as module (with import, require).

  8. waderyan commented on Nov 7, 2016

    @waderyan

    Feedback from VS Code users - microsoft/vscode#818

  9. angelozerr commented on Nov 29, 2016

    @angelozerr
    Author

    Mohamed Hegazy (@mhegazy) I'm sorry to insist with this feature, but is there an chance that auto import could be added inside RoadMap https://github.com/Microsoft/TypeScript/wiki/Roadmap ?

  10. mhegazy commented on Nov 29, 2016

    @mhegazy
    Contributor

    We are planning the next release now. should have more information about what we can take on soon.

  11. angelozerr commented on Nov 30, 2016

    @angelozerr
    Author
  12. prog110 commented on Dec 15, 2016

    @prog110

    This more than anything else is the biggest hurdle for users to move away from Webstorm.
    Note sure why it is not yet listed in the Roadmap as of yet :(

  13. 43 remaining items

  14. mhegazy commented on Oct 17, 2017

    @mhegazy
    Contributor

    Fixed by #19069

  15. locked and limited conversation to collaborators on Jun 19, 2018
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

    Domain: APIRelates to the public API for TypeScriptFixedA PR has been merged for this issueSuggestionAn idea for TypeScriptVS Code TrackedThere is a VS Code equivalent to this issue

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions