简体   繁体   English

WebStorm PhpStorm:如何从索引中跳过特定扩展

[英]WebStorm PhpStorm: how to skip specific extensions from indexing

WebStorm / PhpStorm IDEs allow the user to mark certain directories as "excluded", so that they will not be indexed and the classes contained will not show up in autocomplete etc... ( see here ) WebStorm / PhpStorm IDE允许用户将某些目录标记为“已排除”,这样它们就不会被索引,并且所包含的类也不会显示在自动完成等中。( 请参阅此处

Is it possible to mark specific extensions as excluded. 是否可以将特定扩展名标记为已排除。 All my components have a pair of files such as: 我所有的组件都有一对文件,例如:

my.component.ts  <-- actual component
my.component.spec.ts <-- for testing only

I've seen this doc about how to exclude an individual file, but that doesn't scale well. 我已经看到了这个文档了解如何排除一个单独的文件,但不能很好地扩展。 I would like all the .spec.ts files to be ignored by the indexer because they pollute a lot of the autocomplete UI and slow down my work. 我希望所有.spec.ts文件都被索引器忽略,因为它们会污染大量的自动完成UI并减慢了我的工作。

Since WebStorm/PhpStorm 2017.2 it will be possible to exclude files by pattern - see IDEA-127753 . 从WebStorm / PhpStorm 2017.2开始,可以按模式排除文件-请参阅IDEA-127753 Note also that you can use Ignore files and folders option to exclude certain files by name ( see https://youtrack.jetbrains.com/issue/IDEA-127753#comment=27-868409 ) 另请注意,您可以使用“ 忽略文件和文件夹”选项按名称排除某些文件(请参阅https://youtrack.jetbrains.com/issue/IDEA-127753#comment=27-868409

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从IntelliJ / WebStorm / PhpStorm中的“外部工具”运行sudo脚本? - How can I run a sudo script from “external tools” in IntelliJ / WebStorm / PhpStorm? 如何在GitHub上存储PhpStorm / WebStorm IDE项目设置? - How to store PhpStorm/WebStorm IDE project settings on GitHub? 如何在WebStorm / PhpStorm / Intellij中向“外部库”添加库 - How to add libraries to “External Libraries” in WebStorm/PhpStorm/Intellij 如何在PHPStorm / Webstorm中更改控制台行号? - How do I change the console line number color in PHPStorm/Webstorm? 如何配置 ESLint 自动修复保存在 WebStorm/PHPStorm 中? - How to configure ESLint auto fix on save in WebStorm/PHPStorm? 如何在 PhpStorm(或 WebStorm)中创建多文件模板? - How to create multi-file template in PhpStorm (or WebStorm)? 如何在 WebStorm / PhpStorm 中启用自定义 Angular 库的自动导入? - How to enable auto import for custom Angular library in WebStorm / PhpStorm? 使用PhpStorm和WebStorm的问题 - Issue using PhpStorm along with WebStorm 如何配置WebStorm / PhpStorm项目,以便JS代码智能适用于Node.js项目? - How to configure WebStorm / PhpStorm project so that JS code intelligence works well for Node.js projects? 如何在 IDEA 中运行两个成熟的 window? (或 WebStorm/PyCharm/PhpStorm…) - How run two full-fledged window in IDEA? (or WebStorm/PyCharm/PhpStorm…)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM