Clang Complete for Vim

后端 未结 5 929
盖世英雄少女心
盖世英雄少女心 2021-01-30 14:53

I copied clang_complete.vim to plugin, but when I typed . after some variable, it says:

pattern not found

5条回答
  •  滥情空心
    2021-01-30 15:28

    Did you try to compile the code outside Vim, by explicitly invoking Clang on the command-line?

    I had the same problem with my code, but it turns out Clang was not able to compile my code due to usage of the MPI libraries (mpich2). Maybe a similar problem is causing Clang to fail in your case? In my case, if I remove the MPI-dependencies, everything works fine, for example in something like:

    #include 
    #include 
    
    int main() {
        std::string myString("test string");
        std::cout << myString.size() << std::endl; // After typing the dot, I get a list of std::string methods
    }
    

    By-the-way, I still miss clang_complete in my MPI code. Did anyone find a solution for this?

提交回复
热议问题