Skip to content

Commit

Permalink
tools/goplssetting: omit inlay hints from gopls settings
Browse files Browse the repository at this point in the history
Users can configure inlay hints through the go config.
Omitting these settings to prevent duplicate values.

For golang#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]>
  • Loading branch information
jamalc committed Jun 24, 2022
1 parent 8dfd393 commit 445a42f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tools/goplssetting/goplssetting.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ import (
"strings"
)

var skipHierarchy map[string]bool = map[string]bool{
"ui.inlayhint": true,
}

// Generate reads package.json and updates the gopls settings section
// based on `gopls api-json` output. This function requires `jq` to
// manipulate package.json.
Expand Down Expand Up @@ -212,6 +216,9 @@ func collectProperties(m map[string][]*OptionJSON) (map[string]*Object, error) {
}
properties := map[string]*Object{}
for _, hierarchy := range sorted {
if skip := skipHierarchy[hierarchy]; skip {
continue
}
for _, opt := range m[hierarchy] {
doc := opt.Doc
if mappedTo, ok := associatedToExtensionProperties[opt.Name]; ok {
Expand Down

0 comments on commit 445a42f

Please sign in to comment.