1

i'm trying to install clangd extension to coc plugin in vim when i run CocCommand clangd.install i got these errors :

[coc.nvim] Server clangd failed to start: Error: Pending response rejected since connec
[coc.nvim] clangd client: couldn't create connection to server.

what should i do to solve those?

ks1322
  • 33,961
  • 14
  • 109
  • 164

1 Answers1

0

I had the same problem a few weeks ago, though not optimal I fixed it by downloading clangd separately (either from github or from the LLVM website) and updating the value of the "clangd.path" variable in the coc-settings.json file to the downloaded one.

But for some reason I can't get the "clangd.arguments" variable to get running, whatever I assign it to disrupts my connection to the server. I found a few workarounds temporarily but I'll have to fix it from its root soon or else stuff's going to get pretty hairy.

My current coc-settings.json is like this:

{
"clangd.path": "/usr/bin/clangd",
"suggest.noselect": true,
"clangd.fallbackFlags": ["-I/home/usrname/vcpkg/installed/x64-linux/include", "-L/home/usrname/vcpkg/installed/x64-linux/lib"]
}

Something like this disrupts the connection:

{
"clangd.path": "/usr/bin/clangd",
"suggest.noselect": true,
"clangd.fallbackFlags": ["-I/home/di0n/vcpkg/installed/x64-linux/include","-L/home/di0n/vcpkg/installed/x64-linux/lib"],
"clangd.arguments": ["--c++-std=c++17"]
}
Di0n
  • 65
  • 4