golang/go
x/tools/gopls: Completion: add insert-replace support (insertReplaceEdit)
Aberta
#40.871 aberto em 18 de ago. de 2020
FeatureRequestToolsgoplshelp wanted
Métricas do repositório
- Stars
- (133.883 estrelas)
- Métricas de merge de PR
- (Métricas PR pendentes)
Description
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