Skip to content

Commit 445a42f

Browse files
committed
tools/goplssetting: omit inlay hints from gopls settings
Users can configure inlay hints through the go config. Omitting these settings to prevent duplicate values. For #1631. Change-Id: I4ce10154210b1dc4ba34734a3aa3644b22349134 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/413679 TryBot-Result: kokoro <[email protected]> Run-TryBot: Jamal Carvalho <[email protected]> Reviewed-by: Hyang-Ah Hana Kim <[email protected]> Reviewed-by: Suzy Mueller <[email protected]>
1 parent 8dfd393 commit 445a42f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tools/goplssetting/goplssetting.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ import (
1717
"strings"
1818
)
1919

20+
var skipHierarchy map[string]bool = map[string]bool{
21+
"ui.inlayhint": true,
22+
}
23+
2024
// Generate reads package.json and updates the gopls settings section
2125
// based on `gopls api-json` output. This function requires `jq` to
2226
// manipulate package.json.
@@ -212,6 +216,9 @@ func collectProperties(m map[string][]*OptionJSON) (map[string]*Object, error) {
212216
}
213217
properties := map[string]*Object{}
214218
for _, hierarchy := range sorted {
219+
if skip := skipHierarchy[hierarchy]; skip {
220+
continue
221+
}
215222
for _, opt := range m[hierarchy] {
216223
doc := opt.Doc
217224
if mappedTo, ok := associatedToExtensionProperties[opt.Name]; ok {

0 commit comments

Comments
 (0)