对于angular-cli.json中的node_modules路径的Intellisense?

时间:2017-01-29 17:27:39

标签: angular visual-studio-code angular-cli node-modules

在VS Code中,有没有办法在angular-cli.json中为node_modules路径启用智能感知/自动完成?

这就是我得到的(angular-cli.json):

enter image description here

这就是我想要的(tsconfig.json):

enter image description here

我的VS Code版本是1.8.1。我尝试了以下插件但没有成功:

  • Path Intellisense
  • npm Intellisense
  • Node.js Modules Intellisense

由于某些原因,它们似乎不适用于angular-cli.json。

2 个答案:

答案 0 :(得分:0)

使用Path Intellisense扩展名对我来说效果很好(VSCode版本1.28.2):

enter image description here

由于angular-cli.json已被移动并在Angular 6中重命名为angular.json,因此基本路径不同。

答案 1 :(得分:-2)

您可以使用 Relative Path Extension

请访问文档链接

https://marketplace.visualstudio.com/items?itemName=jakob101.RelativePath

您可以将启动命令从Ctr+Shift+H更改为f2

步骤:

  1. 在vs代码中点击设置
  2. 点击键盘快捷键
  3. 搜索相对路径
  4. 将命令更改为f2

proof pic

相关问题