The ycmd server SHUT DOWN (restart with ':YcmRestartServer'). YCM core library not detected; you need to compile YCM before using it. Follow the instructions in the documentation.
cd ~/.vim/bundle/YouCompleteMe
./install.py --clang-completer
多语言支持(使用这个方法,但是调整成使用系统libclang,见下文)
cd ~/.vim/bundle/YouCompleteMe
./install.py --clang-completer --go-completer --js-completer
这里遇到一个报错
Downloading Clang 5.0.0
CMake Error at ycm/CMakeLists.txt:102 (file):
file DOWNLOAD HASH mismatch
for file: [/home/huatai/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/../clang_archives/clang+llvm-5.0.0-linux-x86_64-ubuntu14.04.tar.xz]
expected hash: [58c1171f326108cfb7641441c5ede7846d58823bce3206c86a84c7ef7748860d]
actual hash: [e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855]
status: [22;"HTTP response code said error"]
xz: (stdin): File format not recognized
tar: Child returned status 1
tar: Error is not recoverable: exiting now
CMake Error at ycm/CMakeLists.txt:135 (message):
Cannot find path to libclang in prebuilt binaries
cd ~/.vim/bundle/YouCompleteMe
./install.py --system-libclang --clang-completer --go-completer --js-completer
已验证,上述方法可行
编译安装后提示
[100%] Built target ycm_core
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN tern_runtime No repository field.
npm WARN tern_runtime No license field.
added 28 packages in 5.704s