diff --git a/internal/lsp/source/implementation.go b/internal/lsp/source/implementation.go index 486e3b1dac..7702b8e2c6 100644 --- a/internal/lsp/source/implementation.go +++ b/internal/lsp/source/implementation.go @@ -77,6 +77,10 @@ func (i *IdentifierInfo) Implementation(ctx context.Context) ([]protocol.Locatio if err != nil { return nil, err } + // Do not add interface itself to the list. + if ident.Declaration.spanRange == i.Declaration.spanRange { + continue + } locations = append(locations, protocol.Location{ URI: protocol.NewURI(ident.Declaration.URI()), Range: decRange,