Auto-Import icon indicating copy to clipboard operation
Auto-Import copied to clipboard

Manually update import index

Open twjacobsen opened this issue 7 years ago • 6 comments

Hi,

I can't seem to find a way to manually trigger refreshing the index, after adding new exports to my code.

Am I just blind? :D

twjacobsen avatar Oct 18 '16 10:10 twjacobsen

You need to save changes - the the extensions can read saved files and find new exports 😉

MichalLytek avatar Oct 18 '16 16:10 MichalLytek

That does not seem to work for me. I need to restart VS Code to reboot the import. But maybe that's something wrong with my setup in general?

On Tue, 18 Oct 2016, 18:49 19majkel94, [email protected] wrote:

You need to save changes - the the extensions can read saved files and find new exports 😉

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/soates/Auto-Import/issues/23#issuecomment-254568778, or mute the thread https://github.com/notifications/unsubscribe-auth/AAh7JJtgxTlCmRLiTDwGY9CRTC9JD_w2ks5q1PiXgaJpZM4KZnTZ .

twjacobsen avatar Oct 18 '16 17:10 twjacobsen

any chance you could send me a sample project? Ideally you dont need to rescan or anything - it should just work :)

soates avatar Oct 19 '16 07:10 soates

I'm afraid I can't send you the entire source - I can send you any configuration files that might be related, though.

I read a little through some other issues, and found, that the "files" section of my tsconfig could be the reason. So I've tried removing that section, to see if that makes any difference.

For reference, this is what the config looked like when things were not working:

{
    "compilerOptions": {
        "target": "es5",
        "sourceMap": true
    },
    "files": [
        "./typings/index.d.ts",
        "src/app/index.ts"
    ],
    "exclude": [
        "node_modules"
    ],
    "compileOnSave": false
}

twjacobsen avatar Oct 19 '16 07:10 twjacobsen

I also seem to have the same issue. My new imports only appear in the auto complete menu after restarting VSCode.

OliverJAsh avatar Nov 18 '16 10:11 OliverJAsh

Easy reproduce : Angular-cli (new project) add 2 component. Like User / Product app /comp /user /product Change folder name of one of them, save. app /comp /users /product Delete import try to reimport. Import with old structure.

wupaz avatar Feb 05 '17 04:02 wupaz