golang/go

x/tools/gopls: Completion: add insert-replace support (insertReplaceEdit)

開放

#40,871 建立於 2020年8月18日

 (15 則留言) (25 個反應) (0 位負責人)Go (19,008 個分叉)batch import
FeatureRequestToolsgoplshelp wanted

倉庫指標

星標
 (133,883 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Currently gopls is overwriting the surrounding suffix (in addition to prefix) when inserting candidates:

// completing to "food" currently results in "food" instead of "foodoo"
f<>oo

I think it's from https://go-review.googlesource.com/c/tools/+/208501 changing the surrounding's range from [ident.Pos(), c.pos] to [ident.Pos(), ident.End()].

/cc @heschik

貢獻者指南