-
Notifications
You must be signed in to change notification settings - Fork 202
Auto-import feature not working #1344
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
Comments
Uh... did we ever have that? Readme doesn't seem to suggest we do now at least.
What's external types?
Wait, what? |
Oops, my bad then. I thought this feature would be present. Indeed no mention about it on the list of features. I believe it would be a very nice addition.
For example, if I define a class export class MyClassA { ... } in a file a.ts.
Stated here, after successful installation a couple of notification messages should appear, which I do not have when installing atom-typescript. Some people reported they experienced better autocompletion after fixing this problem. Unfortunately the proposed fix did not work for me. That's why I thought my installation was perhaps faulty and some features were missing. Thanks and kind regards |
Actually, we do have that feature, I just wasn't aware of it. You need intentions package in addition to atom-typescript, then run 'intentions:show' command on an error with unknown import, kinda like this:
Uhh... we're using tsserver for autocompletion suggestions, and I don't think it does that. More than that, I don't think I'd want local autocompletion scope to be polluted by every possible definition from whole project, I imagine that'd easily turn into a mess for anything larger than "hello world"-type application. Atom will, however, automatically include identifiers from all currently-open buffers. Those have lowest priority, so expect to find them way down in the suggestions list.
That's old. Two years old in fact. We don't do that message anymore. |
Hi, I am also having the same problem. Tried everything but the list just doesn't show up. I am on Windows 10, atom-typescript 11.0.10, Typescript 2.3.4. I also tried to force update the Typescript to the latest version but still didn't work. |
@teristam I have the auto-import feature working now, but I believe it's provided by some other package I installed afterwards. Here's the list of packages I have currently installed:
|
This keep me busy for over 1 hour :( Atom as a build-in Typescript support. If you install atom-typescript plugin there are 2 different kind of Typescript syntax. The solution is to switch to the one from atom-typescript. Done! I will create another issue because I think atom-typescript should disable language-typescript to avoid this confusion. |
I also have no working auto-import feature (I had it once sometime in the past) but I already have language-typescript disabled.
filePath is written using backslash, however errorPusher stores errors using normal slashes.
I don't know WHERE this should be fixed (I guess the filePaths should just always be OS dependent as What I did for now to fix it locally was this in async runCodeFix(textEditor, bufferPosition) {
var filePath = textEditor.getPath();
if (!filePath || !this.errorPusher || !this.clientResolver || !this.withTypescriptBuffer) {
return [];
}
if (path.sep === "\\")
filePath = filePath.replace(/\\/g, "/"); // Change windows path to unix path
/// ...
/// ...
async applyFix(fix) {
for (const f of fix.changes) {
var fileName = f.fileName;
if (path.sep === "\\")
fileName = fileName.replace(/\//g, "\\"); // Change unix path to windows path |
@olee, thanks for catching this. The tricky part here is tsserver only uses Anyway, 12.3.7 should hopefully fix that particular bug, with any luck without introducing new ones. ... although bear in mind you need language-typescript enabled for 12.x, since we've decided it's pointless to try to fight with the bundled grammar and switched to it instead. |
This issue has been marked as stale because it did not have any activity for the last 90 days or more. Remove the stale label or comment or this will be closed in 14 days |
Hello,
A couple of key functionalities of atom-typescript are not working at all for me:
I have a project with a tsconfig.json, and I tried installing the atom-typescript both from Atom package manager and command line. I also tried uninstalling and re-installing atom-typescript, linter and autocomplete-plus, as suggested in another post, without any success.
I did not see any message of the form:
I'm on Elementary OS (Ubuntu 16.04), using Atom 1.19.3 x64 and atom-typescript-11.0.9
Any clues or logs that I can check?
Thanks and kind regards
The text was updated successfully, but these errors were encountered: