Atiris
Atiris

Reputation: 2703

Set .history folder as ignored by intellisense

I need to ignore .history folder from intellisense.
Now it looks like this when I start typing Focus:

enter image description here

As you can see intellisense will offer me every Identical class found in .history folder and this is very very confusing (and find correct one).

I try find something in vscode settings, and on editor site but no success.

.history folder is ignored from git, display in explorer, and tslint:

"files.exclude": {
    "**/.history": true ...
},
"files.watcherExclude": {
    "**/.history/**": true ...
},
"tslint.exclude": ["**/.history/**"] ...

How to achieve ignore .history from intellisense?


Next part is based on the answer from Matt

An important assumption:

Visual Studio Code itself does not contain automatic import and you need an extension for it.

Solution:

I am using extension Auto Import (steoates.autoimport) which contains the setting autoimport.filesToScan. I changed default value from "**/*.{ts,tsx}" to "{src,e2e,node_modules}/**/*.{ts,tsx}" and now everything work as I expected.

Upvotes: 14

Views: 6690

Answers (2)

Marcos
Marcos

Reputation: 1

In your settings.json, you could add this:

"autoimport.filesToScan": "./index.{ts,tsx} ./App.{ts,tsx} ./src/**.*.{ts,tsx}"

Or, if you prefer:

"autoimport.filesToScan": "./{index,App,src/**}.{ts,tsx}"

Upvotes: 0

Matt Bierner
Matt Bierner

Reputation: 65223

Those suggestions are coming whatever extension you have installed that is providing auto-import functionality. Please check to see if that extension has its own exclude setting that you also need to configure

Upvotes: 7

Related Questions