vim coc ccls
coc setting
C:\Users\xxx\vimfiles\coc-settings.json
指定 compile_commands.json
在工程的根目录下的build
目录
"compilationDatabaseDirectory":"build",
{
"languageserver": {
"ccls": {
"command": "ccls",
"filetypes": ["c", "cpp","hpp","h", "cuda", "objc", "objcpp"],
"rootPatterns": [".ccls",".git/"],
"initializationOptions": {
"compilationDatabaseDirectory":"build",
"cache": {
"directory": ".ccls-cache"
},
"client": {
"snippetSupport": true
}
}
}
}
}
ccls setting
在工程的根目录创建文件
.ccls
内容
%compile_commands.json
%h -x
%h c++-header
%hpp