2017-06-12 177 views
2

我需要忽略来自intellisense的.history文件夹。
现在看起来是这样的,当我开始输入焦点:设置.history文件夹被intellisense忽略

enter image description here

正如你可以看到智能感知将提供我.history中文件夹中找到每一个相同的类,这是非常非常混乱(并找到正确的) 。

我试着在vscode设置中找到一些东西,并在editor site上但没有成功。

.history中的文件夹是从混帐,显示在资源管理器忽略,tslint:

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

如何实现从智能感知忽略.history中?


下一部分是基于答案马特

一个重要假设:

Visual Studio代码本身并不包含自动导入和你需要它延期。

解决方案:

我使用扩展自动导入steoates.autoimport),其中包含了设置autoimport.filesToScan。我将"**/*.{ts,tsx}"的默认值更改为"{src,e2e,node_modules}/**/*.{ts,tsx}",现在一切正常。

+0

也许相关:https://stackoverflow.com/questions/39388529/how-to-exclude-a-folder-from-tslint –

+0

对不起,但是不相关,正如我写的,tslint排除已经设置(并没有帮助避免这种导入混乱)。而且intellisense(vscode核心)与lint(扩展)完全不同。 – Atiris

回答

2

这些建议即将推出,无论您安装的是否提供了自动导入功能。请检查该扩展是否有其自己的exclude设置,您还需要配置

+0

你是对的。我将用您的解决方案扩展我的问题。 – Atiris