跳至主要內容

禁用 vscode 中点击 go 包名时自动跳转到 pkg.go.dev

安格原创IDEidevscodegolang大约 1 分钟...

在 vscode 设置项中配置 gopls 的 ui.navigation.importShortcutDefinition 即可。

"gopls": {
    "ui.navigation.importShortcut": "Definition"
}

ui.navigation.importShortcut 接受的值:

  • "Both" (默认,同时跳转定义并打开 godoc 链接)
  • "Definition" (仅跳转定义处)
  • "Link" (跳转 godoc 链接)

关于 gopls 更多内容请参考: gopls 文档open in new window

importShortcut enum

importShortcut specifies whether import statements should link to documentation or go to definitions.

Must be one of:

  • "Both"
  • "Definition"
  • "Link"

Default: "Both".

上次编辑于:
你认为这篇文章怎么样?
  • 0
  • 0
  • 0
  • 0
  • 0
  • 0
评论
  • 按正序
  • 按倒序
  • 按热度
Powered by Waline v3.1.3