Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 606
Atiris Avatar asked Jun 12 '17 08:06

Atiris


People also ask

How do I ignore a folder in VS Code?

File -> Preferences -> Settings (or on Mac Code -> Preferences -> Settings) Features -> Search -> check Use Ignore files.

How do I ignore VS Code suggestions?

By default, VS Code shows snippets and completion proposals in one widget. You can control the behavior with the editor.snippetSuggestions setting. To remove snippets from the suggestions widget, set the value to "none" .


1 Answers

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

like image 106
Matt Bierner Avatar answered Oct 27 '22 00:10

Matt Bierner