vscode-go: any code using cgo does not show suggestions when using the Go and ClangD extensions

26 views Asked by At

My understanding is the Go extension for vscode calls the relevant C extension when completing cgo code. When I use the Microsoft C/C++ extension, the cgo completions seem to work. However, I prefer the ClangD extension, but the combination of ClangD and gopls gives no cgo completions.

Is this expected, or did I screw up the config? The two language servers seem to be working fine until it’s time to deal with cgo. Also, all code compiles fine from my console.

0

There are 0 answers