clangd / coc-clangd

clangd extension for coc.nvim
Apache License 2.0
762 stars 34 forks source link

I don't want to update clangd #455

Closed minhanghuang closed 2 years ago

minhanghuang commented 2 years ago

Hi all ! I don't want to update clangd, How should I set it ?

[coc.nvim] clangd was not found on your PATH. :CocCommand clangd.install will install 14.0.3.

Here's the coc-settings.json

{
  "clangd.path": "~/.config/coc/extensions/coc-clangd-data/install/14.0.0/clangd_14.0.0/bin/clangd",
  "Lua.telemetry.enable": true
}
fannheyward commented 2 years ago

What's your coc-clangd version? You can get it from :CocList extensions.

When you set clangd.path and the clangd bin was existed, coc-clangd won't download/update clangd.

minhanghuang commented 2 years ago

coc-clangd version: 0.21.4

+ coc-clangd 0.21.4 ~/.config/coc/extensions/node_modules/coc-clangd

I set clangd.path in coc-settings.json, but when I open *.cpp file, neovim prompted to [coc.nvim] clangd was not found on your PATH. :CocCommand clangd.install will install 14.0.3

fannheyward commented 2 years ago

Does ~/.config/coc/extensions/coc-clangd-data/install/14.0.0/clangd_14.0.0/bin/clangd exist?

[coc.nvim] clangd was not found on your PATH. :CocCommand clangd.install will install 14.0.3

coc-clangd will try to find clangd from clangd.path first, then which from PATH. When not found, coc-clangd will prompt the not found message.

I've tested with custom clangd.path, can't reproduce this.

minhanghuang commented 2 years ago

~/.config/coc/extensions/coc-clangd-data/install/14.0.0/clangd_14.0.0/bin/clangd not exist, but I didn't delete it.

fannheyward commented 2 years ago

coc-clangd won't delete this, try :CocCommand clangd.install to install it.