golang/go
x/tools/gopls: Completion: add insert-replace support (insertReplaceEdit)
开放
#40,871 创建于 2020年8月18日
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