转到定义与代码转到 node_modules/@types 而不是我的 .ts 文件

MD1*_*D10 5 visual-studio-code

通常当我想导航到 vs 代码中的定义时,我会收到一个烦人的弹出窗口,让我在 .d.ts 文件和我的文件之间进行选择 在此处输入图片说明

我想删除它并让它始终导航到我的文件。我改变了这个在此处输入图片说明,但现在它总是转到 .d.ts 文件。我怎样才能让它转到我的组件声明?

Bra*_*man 1

不幸的是,它总是会转到主要来源。根据我的研究,没有办法选择主要来源。下面是为此的settings.json。

  //  - peek: Show peek view of the results (default)
  //  - gotoAndPeek: Go to the primary result and show a peek view
  //  - goto: Go to the primary result and enable peek-less navigation to others
  "editor.gotoLocation.multipleDefinitions": "peek",
Run Code Online (Sandbox Code Playgroud)

您仍然可以通过使用f12按键切换位置来快速导航