Skip to content

autocomplete imports #425

Open
Open

Description

I am not sure why I could not find any mention of this: I am really missing a feature to autocomplete on missing classes, e.g. when using Http from angular2/http, and given that angular2 is on the node_modules default path (or inside my tsconfig files configuration) I would expect the autocompletion to pick this definition up and add the corresponding import statement.

Activity

  1. ambition-consulting commented on Jan 8, 2016

    @ambition-consulting
    Author

    Just to clarify, I am talking about SystemJS import, .e.g. 'import {XYZ} from "XYZ/XYZ"'

  2. mhegazy commented on Jan 14, 2016

    @mhegazy
    Contributor

    This issue was moved to microsoft/TypeScript#6486

  3. mhegazy commented on Jan 14, 2016

    @mhegazy
    Contributor

    this looks like a general suggestion and not specific to sublime-text. moving to the typescript repo.

  4. binarious commented on Sep 26, 2016

    @binarious

    microsoft/TypeScript#9353 was merged. Isn't there any adoption required for this plugin?

  5. mhegazy commented on Sep 26, 2016

    @mhegazy
    Contributor

    there are some changes on this side as well that would be needed. Zhengbo Li (@zhengbli) how do you want to handle that?

  6. zhengbli commented on Sep 27, 2016

    @zhengbli
    Contributor

    Currently microsoft/TypeScript#9353 is only merged with the master branch, and is not released yet. It is scheduled to be released soon with v 2.0.5 on npm, and we should working on the support after its release. Will track the release in this issue.

  7. alexjlockwood commented on Jan 14, 2017

    @alexjlockwood

    Any updates on this? It would be amazing if there was a way to auto-generate import statements somehow. Typescript support in ST3 has been absolutely incredible for me... having to scroll up to the top of each file to add missing imports is literally the one thing I wish could be improved. :)

  8. roblav96 commented on Feb 3, 2017

    @roblav96

    Zhengbo Li (@zhengbli) this would be a killer feature to add

  9. binarious commented on Mar 18, 2017

    @binarious

    Zhengbo Li (@zhengbli) It has been released and is already working in Visual Studio Code. Would be great to have it in Sublime, too.

  10. princemaple commented on Apr 8, 2017

    @princemaple

    Typescript 2.2 can automatically add missing import statements, would be great to have that integrated!

  11. Appius commented on Jun 8, 2017

    @Appius

    Any news, guys? Really looking forward for this feature.

  12. michalmw commented on Sep 14, 2017

    @michalmw

    Something new? I can pay for this plugin..
    Without this i can work with typescript - angular2.. in sublime.

  13. jessecstewart commented on Sep 20, 2017

    @jessecstewart

    This would be a really nice feature. +1

  14. alexmacavei commented on Oct 3, 2017

    @alexmacavei

    +1... would be really great to have this 👍

  15. predragnikolic commented on Oct 8, 2017

    @predragnikolic
  16. alexmacavei commented on Nov 1, 2017

    @alexmacavei

    Not really useful, doesn't seem to work with Angular (@angular) modules or external libraries... :(

  17. jessecstewart commented on Nov 2, 2017

    @jessecstewart

    sublime-import-helper will work with @angular/external libraries. I believe I had to modify the node path to get it working

  18. AnandSharma13 commented on Jul 29, 2018

    @AnandSharma13

    Any update on this feature? This will be a huge push for the plugin. +1

  19. predragnikolic commented on Jul 30, 2018

    @predragnikolic

    There is a LSP plugin for sublime by Tom Van Ommeren. Install it, and follow the instructions for installing JavaScript/Typescript language server.

    You will get smart autocompletion, error panel and much more for js/ts files. There is also support for other languages.

    When a class or symbol is not recognized it will offer you to import the symbol via the 'code actions'.

    If you have any problem setting it up, ping me :-)

  20. osdiab commented on Jun 12, 2020

    @osdiab

    What's the latest on this after a couple years? VSCode does it just fine, would love if Sublime could too! (sick and tired of poor Electron perf).

  21. orta commented on Jun 12, 2020

    @orta
    Contributor

    No one has submitted any PRs adding it to this extension, you're welcome to take a look?

  22. osdiab commented on Jun 15, 2020

    @osdiab

    Ended up opting for neovim instead (able to get VSCode level of functionality without much fuss via this great article's suggestions if anyone's interested, i couldn't figure out and gave up on the Sublime LSP plugin above after struggling with it unfortunately) - but I hope someone ends up doing this to make the sublime community stronger :)

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