https://vimawesome.com/plugin/coc-nvim
- 安装ccls
sudo pacman -S ccls
https://blog.csdn.net/yupei881027/article/details/104876551/
https://www.jianshu.com/p/55cf1fa7a467
git clone --depth=1 --recursive https://github.com/MaskRay/ccls
cmake -H. -BRelease -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_PREFIX_PATH=/path/to/clang+llvm
cd ccls
sudo cmake --build Release --target install
- install extensions
:CocInstall coc-json coc-tsserver
- 配置c/c++ language server
:CocConfig
https://github.com/neoclide/coc.nvim/wiki/Language-servers#ccobjective-c
{
"languageserver": {
"ccls": {
"command": "ccls",
"filetypes": ["c", "cc", "cpp", "c++", "objc", "objcpp"],
"rootPatterns": [".ccls", "compile_commands.json", ".git/", ".hg/"],
"initializationOptions": {
"cache": {
"directory": "/tmp/ccls"
}
}
}
}
}
CocInstall coc-lua
#安装lua-lsp
#https://github.com/Alloyed/lua-lsp
luarocks install --server=http://luarocks.org/dev lua-lsp
"languageserver": {
"lua": {
"command": "lua-lsp",
"filetypes": ["lua"]
}
}