Skip to content
Charles Qiu edited this page Mar 29, 2016 · 15 revisions

YouCompleteMe cannot complete some standard C/C++ headers

You need to add full paths of your headers to your "~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py" file. For example:

'-isystem',
'/usr/include',
'-isystem',
'/usr/include/c++/4.8'

Fail to compile YouCompleteMe if "--system-libclang" option is added

If you have installed clang, and the error below still occurs

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
TEMP
    linked by target "ycm_core" in directory /Users/joe/.vim/bundle/YouCompleteMe/cpp/ycm

-- Configuring incomplete, errors occurred!

Please run shell command below:

# Ubuntu ("x" depends on your clang version)
cd /usr/lib/llvm-3.x/lib/ && sudo ln -s libclang.so.1 libclang.so

# OpenSUSE ("x" depends on your clang version)
cd /usr/lib64/ && sudo ln -s libclang.so.3.x libclang.so

Cannot complete javascript code

If monkey-vim cannot complete javascript code, and the error below occurs

RuntimeError: Warning: Unable to detect a .tern-project file in the hierarchy before xxxxx and no global .tern-config file was found. This is required for accurate JavaScript completion. Please see the User Guide for details.

You should create ".tern-project" file to your js project root. And then add below config to your ".tern-project" file.

{
    "ecmaVersion": 6,
    "libs": [
        "browser",
        "jquery",
        "underscore"
    ],
    "loadEagerly": [
        "path/to/your/js/**/*.js"
    ],
    "dontLoad": [
        "path/to/your/js/**/*.js"
    ],
    "plugins": {
        "complete_strings": {},
        "node": {},
        "angular": {},
        "requirejs": {
            "baseURL": "./",
            "paths": {}
        },
        "modules": {},
        "es_modules": {},
        "doc_comment": {
            "fullDocs": true
        }
    }
}

For a list of possible plugins, refer here

Clone this wiki locally