gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 17:22:18 24 4
gpt4 key购买 nike

通常当我想导航到 vs 代码中的定义时,我会收到一个烦人的弹出窗口,让我在 .d.ts 文件和我的文件之间进行选择
enter image description here
我想删除它并让它始终导航到我的文件。我改了这个 enter image description here ,但现在它总是转到 .d.ts 文件。我怎样才能让它转到我的组件声明?

最佳答案

不幸的是,它总是会转到主要来源。根据我的研究,没有办法选择主要来源是什么。以下是用于此的 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",
您仍然可以使用 f12 快速导航。切换位置的键

关于visual-studio-code - 转到定义与代码转到 node_modules/@types 而不是我的 .ts 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66942227/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com