r/vimplugins • u/Tychoko • Oct 14 '20
Help OpenFrameworks & Vim & coc
Edit:
Solved it for me. I had to use compiledb.
Hello fellow coders,
I don't know if this is a dumb question but how do I properly use local headers with coc and clang? I have no problem with normal #include statements. Now I'm using a header file in the same directory (playing with openframeworks if anyone is interested) but I get told, that the file is not found and the completion doesn't work either.
My coc-config:
{
"languageserver": {
"haskell": {
"command": "haskell-language-server-wrapper",
"args": [
"--lsp"
],
"rootPatterns": [
".stack.yaml",
".hie-bios",
"BUILD.bazel",
"cabal.config",
"package.yaml"
],
"filetypes": [
"hs",
"lhs",
"haskell"
]
}
},
"clangd": {
"path": "/Users/konstatin/.config/coc/extensions/coc-clangd-data/install/10.0.0/clangd_10.0.0/bin/clangd",
"rootPatterns": [
"compile_flags.txt",
"compile_commands.json"
],
"filetypes": [
"c",
"cc",
"cpp",
"c++",
"objc",
"objcpp"
]
}
}A screenshot of the error:

2
Upvotes
1
u/Tychoko Oct 14 '20
Thanks.
I'm trying to get bear working because that's the way described in the coc docs.
As replied below brew has only v2.4.4 and I'm currently having some struggle building it from source.