在vscode-go中,选项`formatting.local`是否有效?

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

The option formatting.local in vscode-go its working?

问题

我正在使用vscode-go扩展,并阅读选项时,我发现存在formatting.local选项,但是这个选项似乎不起作用,我尝试配置如下...

settings.json

"go.formatTool": "goimports",
"go.formatting.local": "github.com/mycompany/my_app"

可能出了什么问题?

英文:

I'm using vscode-go extension and reading the options I see than exist the formatting.local option but this option seems not be working Im trying to configure like this...

settings.json

"go.formatTool": "goimports",
"go.formatting.local": "github.com/mycompany/my_app"

What could be wrong?

答案1

得分: 2

"formatting.local"是gopls的设置。https://github.com/golang/vscode-go/blob/master/docs/settings.md#settings-for-gopls 所以,请暂时将其添加到"gopls"块中。

"gopls": {
   "formatting.local": "github.com/mycompany/my_app"
}
英文:

"formatting.local" is a gopls setting. https://github.com/golang/vscode-go/blob/master/docs/settings.md#settings-for-gopls So, please add it inside the "gopls" block for now.

"gopls": {
   "formatting.local": "github.com/mycompany/my_app"
}

huangapple
  • 本文由 发表于 2021年8月13日 08:05:52
  • 转载请务必保留本文链接:https://go.coder-hub.com/68765400.html
匿名

发表评论

匿名网友

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

确定