0

就我而言,我试图coc-clangd在有防火墙的地方使用,以防止访问外部资源(如 github)。然而,有一种方法可以拥有 github repos 的本地镜像。这是我有副本的地方coc.nvimclangd/coc-clangd

但是,安装此扩展程序并不能开箱即用:

第一种方法:CocInstall http://companymirror/github/clangd/coc-clangd.git

结果... in is not supported, coc.nvim support github.com only

第二种方法:( Plug 'clangd/coc-clangd', {'do': 'yarn install --frozen-lockfile'}.vimrcwith 中vim-plug)导致错误:PlugInstall


    warning package.json: License should be a valid SPDX license expression
    warning coc-clangd@0.4.10: License should be a valid SPDX license expression
    [1/5] Validating package.json...
    warning coc-clangd@0.4.10: License should be a valid SPDX license expression
    warning coc-clangd@0.4.10: The engine "coc" appears to be invalid.
    [2/5] Resolving packages...
    [3/5] Fetching packages...
    error An unexpected error occurred: "https://registry.yarnpkg.com/readdirp/-/readdirp-3.4.0.tgz: self signed certificate in certificate chain".
    info If you think this is a bug, please open a bug report with the information provided in "/home/user/.vim/plugged/coc-clangd/yarn-error.log".
    info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

哪里/home/user/.vim/plugged/coc-clangd/yarn-error.log有:

Arguments:

      /usr/local/node-v12.18.0-linux-x64/bin/node /usr/share/yarn/bin/yarn.js install --frozen-lockfile
    PATH:
      /usr/local/node-v12.18.0-linux-x64/bin:/software/centos7/binutils/2.30/bin:/software/centos7/ccache/3.2.2/bin:/software/centos7/cmake/3.13.2/bin:/software/centos7/gdb/8.1/bin:/software/centos7/gcc/8.2.0/bin:/home/user/bin/fzf/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/user/.fzf/bin:/usr/lib/llvm10/10.0.0/bin/:/home/user/.local/bin:/home/user/bin/fzf-0.17.5/:/home/user/bin
    Yarn version:
      1.22.4
    Node version:
      12.18.0
    Platform:
      linux x64
    Trace:
      Error: self signed certificate in certificate chain
          at TLSSocket.onConnectSecure (_tls_wrap.js:1506:34)
          at TLSSocket.emit (events.js:315:20)
          at TLSSocket._finishInit (_tls_wrap.js:948:8)
          at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:706:12)

系统信息:

Clangd 版本:10.0.0

操作系统:CentOS 7.3

编辑:没有可用的代理服务器,可以允许使用http_proxy类似的环境变量。

编辑2:这似乎是yarn配置问题。 这个问题给出了运行提示yarn config set "strict-ssl" false -g,它关闭了证书检查并让我安装扩展!

4

0 回答 0