You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Reacted by binarious, Mariusz Dugin, drew-wallace, Noah Rawlins, Oscar, Wiktor Obrębski, Ilya Borisov, Omar Diab and Martin
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.
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. :)
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 :)
Activity
ambition-consulting commentedon Jan 8, 2016
Just to clarify, I am talking about SystemJS import, .e.g. 'import {XYZ} from "XYZ/XYZ"'
mhegazy commentedon Jan 14, 2016
This issue was moved to microsoft/TypeScript#6486
mhegazy commentedon Jan 14, 2016
this looks like a general suggestion and not specific to sublime-text. moving to the typescript repo.
binarious commentedon Sep 26, 2016
microsoft/TypeScript#9353 was merged. Isn't there any adoption required for this plugin?
mhegazy commentedon Sep 26, 2016
there are some changes on this side as well that would be needed. Zhengbo Li (@zhengbli) how do you want to handle that?
zhengbli commentedon Sep 27, 2016
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.
alexjlockwood commentedon Jan 14, 2017
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 commentedon Feb 3, 2017
Zhengbo Li (@zhengbli) this would be a killer feature to add
binarious commentedon Mar 18, 2017
Zhengbo Li (@zhengbli) It has been released and is already working in Visual Studio Code. Would be great to have it in Sublime, too.
princemaple commentedon Apr 8, 2017
Typescript 2.2 can automatically add missing import statements, would be great to have that integrated!
Appius commentedon Jun 8, 2017
Any news, guys? Really looking forward for this feature.
michalmw commentedon Sep 14, 2017
Something new? I can pay for this plugin..
Without this i can work with typescript - angular2.. in sublime.
jessecstewart commentedon Sep 20, 2017
This would be a really nice feature. +1
alexmacavei commentedon Oct 3, 2017
+1... would be really great to have this 👍
predragnikolic commentedon Oct 8, 2017
sublime-import-helper
alexmacavei commentedon Nov 1, 2017
Not really useful, doesn't seem to work with Angular (@angular) modules or external libraries... :(
jessecstewart commentedon Nov 2, 2017
sublime-import-helper will work with @angular/external libraries. I believe I had to modify the node path to get it working
AnandSharma13 commentedon Jul 29, 2018
Any update on this feature? This will be a huge push for the plugin. +1
predragnikolic commentedon Jul 30, 2018
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 commentedon 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 commentedon Jun 12, 2020
No one has submitted any PRs adding it to this extension, you're welcome to take a look?
osdiab commentedon 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 :)