ncm-clang
ncm-clang copied to clipboard
Can't find files in include path of compile-commands.json during completion
I have a compile_commans.json in my project's root path, but ncm-clang can not read it. As shown in these pictures, if it can find the include path, it can give the completion of testing, but it didn't. The project can be built, so the compiler can find the include file "gtest/gtest.h", so it should be ncm-clang didn't find the databash file.
I found two problems here. The first one is when there are paths in compile_commands.json, ncm-clang will remove all the "\\" and which is auto generated by cmake when in windows.
I try to fix it myself, and when I changed here in ncm_clang.py it works.
The second problem is that cmake only generate a compile_commands.json with a includes_CXX.rsp file by default, but ncm-clang can not get the include paths from this file.
When getting the correct include paths, the plugin can just give the right completion.