soates / Auto-Import

vscode extension that will automatically finds, parses and provides code actions for all available imports. Only currently works with files in your folder and TypeScript.
MIT License
164 stars 62 forks source link

Wasn't working when first installed. #48

Open bjohnson-va opened 7 years ago

bjohnson-va commented 7 years ago

I had just installed vscode on OS X Sierra and was working on a component. I did not yet have this plugin installed.

Here's the code:

import { Input, Component } from '@angular/core';
import {Account} from "./account";

@Component({
    selector: 'account-info',
    template: `
    <div>{{account.companyName}}</div>
    <div>{{account.address}}</div>
    <div>{{account.}}</div>
`
})
export class AccountInfoComponent implements OnInit {
    @Input() account: Account;
}

I installed this plugin, reloaded VSCode and tried to use the autocomplete feature to import OnInit.

The context menu showed up and displayed two options. image

Nothing happened when I pressed enter on either one or clicked on either one.

I had to erase this line before the plugin would start working.

import { Input, Component } from '@angular/core';
sanket360 commented 7 years ago

@bjohnson-va How to get a context menu? AutoImport extension not working for me. I have raised question here - https://github.com/soates/Auto-Import/issues/44

bjohnson-va commented 7 years ago

@sanket360 I used alt-enter while my keyboard cursor was placed within OnInit

vlio20 commented 7 years ago

@sanket360 , are you using mac OS?

sanket360 commented 7 years ago

No @vlio20... I am on windows

sanket360 commented 7 years ago

@bjohnson-va thanks for reply but alt-enter while my keyboard cursor was placed within OnInit doesnt work for me. As per demo, it should show yellow light bulb on move hover.