mirror of
https://github.com/golang/go.git
synced 2025-05-07 16:43:03 +00:00
internal/lsp: add type to placeholders in completion parameters
Fixes golang/go#31547 Change-Id: Ib6e54ae17c778421a49f34d3c60d56b126419a91 Reviewed-on: https://go-review.googlesource.com/c/tools/+/172666 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Cottrell <iancottrell@google.com>
This commit is contained in:
parent
f939817187
commit
c39e7748f6
@ -155,8 +155,7 @@ func labelToInsertText(label string, kind source.CompletionItemKind, insertTextF
|
||||
if i != 0 {
|
||||
b.WriteString(", ")
|
||||
}
|
||||
p = strings.Split(strings.Trim(p, " "), " ")[0]
|
||||
fmt.Fprintf(b, "${%v:%v}", i+1, r.Replace(p))
|
||||
fmt.Fprintf(b, "${%v:%v}", i+1, r.Replace(strings.TrimSpace(p)))
|
||||
}
|
||||
b.WriteByte(')')
|
||||
return b.String()
|
||||
|
Loading…
x
Reference in New Issue
Block a user