When UsesCgo is enabled, cgo symbols appear in the package as their mangled names, e.g. _CFunc_GoString. This breaks autocomplete in gopls for C symbols. Also, it exposes things that are implementation details, like the _cgo_ and __cgofn symbols.
We can try to fix this in gopls, but probably it'd be better in go/types. I'm not sure offhand how it'll work, given that each package needs its own version of "C". Maybe the package path could be rewritten to something specific?
When UsesCgo is enabled, cgo symbols appear in the package as their mangled names, e.g.
_CFunc_GoString. This breaks autocomplete in gopls forCsymbols. Also, it exposes things that are implementation details, like the_cgo_and__cgofnsymbols.We can try to fix this in gopls, but probably it'd be better in
go/types. I'm not sure offhand how it'll work, given that each package needs its own version of "C". Maybe the package path could be rewritten to something specific?