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

Auto imports #167

Closed
ivikash opened this issue Jun 17, 2017 · 5 comments
Closed

Auto imports #167

ivikash opened this issue Jun 17, 2017 · 5 comments
Labels

Comments

@ivikash
Copy link

ivikash commented Jun 17, 2017

Hey, I wanted to know if there is a way for autoimports, something like Optimizing Imports available in webstorm https://www.jetbrains.com/help/webstorm/2017.1/optimizing-imports.html

@josteink
Copy link
Collaborator

This really needs to be implemented in tsserver in the form of a code-fix.

If/when it does it should be possible to implement support for this in tide, but not before.

@krksgbr
Copy link

krksgbr commented Jul 7, 2017

Fixing missing imports is supported since TS 2.2. I just tried it with tide-fix and it works. There seem to be more improvements coming as well.

@josteink
Copy link
Collaborator

josteink commented Jul 7, 2017

Auto imports works. I know that because I implemented code-fixes and that was my first test-case :)

What @ivikash ask for is removing imports which are not being used. That is AFAIK currently unsupported.

@ananthakumaran
Copy link
Owner

There is an open issue for Organize Imports microsoft/TypeScript#10020.

@josteink microsoft/TypeScript#7849 is linked to auto-complete feature, I guess the idea is to add the import automatically once the user select entry via autocomplete.

@josteink
Copy link
Collaborator

I guess this question can be considered answered by now, so I'm closing it.

If someone feels like working on this, we're very friendly to PRs :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants