Clangd not found in coc-clangd but found in $PATH
See original GitHub issueCoc-clangd doesn’t detect my clangd binary installed with homebrew at /usr/local/Cellar/llvm/10.0.0_3/bin/clangd
that I symlinked to ~/.local/bin/clangd
and I added ~/.local/bin/
to my $PATH
. I can run clangd from inside neovim as :!clangd
without a problem but coc-clangd can’t detect it without hardcoding the path in coc-settings.json
with "clangd.path": "/usr/local/opt/llvm/10.0.0_3/bin/clangd"
. If I symlink the binary to /usr/local/bin
instead it just works.
I would like to avoid hardcoding the path to coc-settings.json since it wouldn’t be portable to my Linux computer. So my question is: where does coc-clangd search for clangd
and why is it not using my $PATH
?
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
CocCommand clangd.install · Issue #61 - GitHub
The guide claims coc-clangd will try to find clangd in my $PATH. I know that clangd is not in my $PATH, but I...
Read more >Clangd is not found in VIM using neoclide / coc.nvim
clangd-10 will be installed as clangd-10 , try this: sudo ... Make sure clangd can been found from $PATH , check: which clangd...
Read more >[coc.nvim] clangd was not found on your PATH. - Reddit
Since my last CocUpdate my clangd server crashes when I try to expand a node from the. :CocCommand document.showIncomingCalls. with the message :....
Read more >coc-clangd - npm
in vim, run :CocInstall coc-clangd; coc-clangd will try to find clangd from your $PATH , if not found, you can run :CocCommand ......
Read more >Getting started with clangd — Extra Clang Tools 10 ...
Choose View –> Extensions, then search for “clangd”. (Make sure the Microsoft C/C++ extension is not installed). After restarting, you should see red...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You’ve put “~/.local/bin” on your path instead of “/Users/<MY_USERNAME>/.local/bin”. This is nonstandard - PATH should contain real paths. Bash supports it as an extension (on my system, when invoked as
bash
but not when invoked assh
) but not all tools do. In particular thenpm-which
library used by coc to find the binary doesn’t support this.You can fix this by unquoting the ~ so the shell will expand it:
ln -s /usr/local/bin/clangd /$HOME/.config/coc/extensions/coc-clangd-data/install/10.0.0/clangd_10.0.0/bin/clangd