coc-clangd: could not create connection to server
- paltform: macos
- coc-settings:
"clangd.path":"~/.config/coc/extensions/coc-clangd-data/install/15.0.6/clangd_15.0.6/bin/clangd"
-
clangd was install in offical github-repo
clangd-mac-15.6.0.zip
-
shell cmd execute
~/.config/coc/extensions/coc-clangd-data/install/15.0.6/clangd_15.0.6/bin/clangd
clangd is a language server that provides IDE-like features to editors.
It should be used via an editor plugin rather than invoked directly. For more information, see:
https://clangd.llvm.org/
https://microsoft.github.io/language-server-protocol/
clangd accepts flags on the commandline, and in the CLANGD_FLAGS environment variable.
I[23:31:51.975] clangd version 15.0.6 (https://github.com/llvm/llvm-project 088f33605d8a61ff519c580a71b1dd57d16a03f8)
I[23:31:51.976] Features: mac+grpc+xpc
I[23:31:51.976] PID: 15297
I[23:31:51.976] Working directory: /Users/zhangjiang/workspace/faiss
I[23:31:51.976] argv[0]: /Users/zhangjiang/.config/coc/extensions/coc-clangd-data/install/15.0.6/clangd_15.0.6/bin/clangd
I[23:31:51.977] Starting LSP over stdin/stdout
seems okay.
I don’t know what’s wrong, need help THX!
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 25 (13 by maintainers)
@oren0e set
clangd.path
to/usr/local/opt/llvm/bin/clangd
in your coc-settings.json please.@meinzer1899 https://github.com/clangd/node-clangd/pull/25
@oren0e the
clangd
installed from GitHub is broken, you can delete~/.config/coc/extensions/coc-clangd-data/
, coc-clangd can useclangd
from your $PATH.Looks like the clangd downloaded from GitHub is broken, will look into this.
I get the same error after
clangd
installed from the commandCocCommand clangd.install
became version 16.0.2 a couple of days ago. If I switch back to 15.0.6 the problem disappears.Would be good to know if this is expected to be fixed later or one should not install clangd with
CocCommand
any more?Same here:
Workaround (used for Ubuntu 22.04):
unzip clangd-linux-16.0.2.zip -d ~/.config/coc/extensions/coc-clangd-data/install/16.0.2
./clangd --version
; should print