Skip to content

autocomplete imports #425

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

Open
ambition-consulting opened this issue Jan 5, 2016 · 22 comments
Open

autocomplete imports #425

ambition-consulting opened this issue Jan 5, 2016 · 22 comments

Comments

@ambition-consulting
Copy link

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.

@ambition-consulting
Copy link
Author

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

@mhegazy
Copy link
Contributor

mhegazy commented Jan 14, 2016

This issue was moved to microsoft/TypeScript#6486

@mhegazy mhegazy closed this as completed Jan 14, 2016
@mhegazy
Copy link
Contributor

mhegazy commented Jan 14, 2016

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

@binarious
Copy link

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

@mhegazy
Copy link
Contributor

mhegazy commented Sep 26, 2016

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

@zhengbli
Copy link
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.

@zhengbli zhengbli reopened this Sep 27, 2016
@alexjlockwood
Copy link

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. :)

@roblav96
Copy link

roblav96 commented Feb 3, 2017

@zhengbli this would be a killer feature to add

@binarious
Copy link

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

@princemaple
Copy link

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

@Appius
Copy link

Appius commented Jun 8, 2017

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

@michalmw
Copy link

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

@jessecstewart
Copy link

This would be a really nice feature. +1

@alexmacavei
Copy link

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

@predragnikolic
Copy link

sublime-import-helper

@alexmacavei
Copy link

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

@jessecstewart
Copy link

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

@AnandSharma13
Copy link

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

@predragnikolic
Copy link

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 :-)

@osdiab
Copy link

osdiab commented Jun 12, 2020

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).

@orta
Copy link
Contributor

orta commented Jun 12, 2020

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

@osdiab
Copy link

osdiab commented Jun 15, 2020

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests