How to display golang package full path in vscode when there are multiple package with same name?

huangapple go评论100阅读模式
英文:

How to display golang package full path in vscode when there are multiple package with same name?

问题

与https://stackoverflow.com/questions/48381598/how-to-force-vscode-to-require-manual-choice-where-goimports-match-multiple-pack?newreg=588e09d23d87415d83175c3340c7fc79类似的问题。

我有两个位于不同目录下的包:
github.com/myproject/mytest1/mytest
github.com/myproject/mytest2/mytest

当我输入"mytest"时,自动完成会给出两个"mytest"的suggestion。我无法确定这两个"mytest"属于哪个目录。有没有办法显示包的完整路径?

英文:

similar issue with https://stackoverflow.com/questions/48381598/how-to-force-vscode-to-require-manual-choice-where-goimports-match-multiple-pack?newreg=588e09d23d87415d83175c3340c7fc79

I have two package under different directories
github.com/myproject/mytest1/mytest
github.com/myproject/mytest2/mytest

When I type "mytest", the autocomplete gives me the
suggestion with two "mytest". I can't tell which directory the two "mytest" belong to. Is there a way to display the full path of package?

答案1

得分: 1

使用箭头在自动完成窗口中移动选择。

How to display golang package full path in vscode when there are multiple package with same name?

英文:

Use arrows to move selection in the autocomple window.
How to display golang package full path in vscode when there are multiple package with same name?

答案2

得分: 0

在Mac上,当你看到选择列表时,按下^ + 空格。这将在你从一个包移动到另一个包时显示完整的包路径。

英文:

On a Mac, when you see the list with choices, press ^ + Space. That will show the full package path as you move from one package to the other.

huangapple
  • 本文由 发表于 2022年8月24日 19:20:40
  • 转载请务必保留本文链接:https://go.coder-hub.com/73472221.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定