{"action":"closed","issue":{"url":"https://api.github.com/repos/Valloric/YouCompleteMe/issues/1624","labels_url":"https://api.github.com/repos/Valloric/YouCompleteMe/issues/1624/labels{/name}","comments_url":"https://api.github.com/repos/Valloric/YouCompleteMe/issues/1624/comments","events_url":"https://api.github.com/repos/Valloric/YouCompleteMe/issues/1624/events","html_url":"https://github.com/Valloric/YouCompleteMe/issues/1624","id":99897206,"number":1624,"title":"YCM doesn't complete any identifier that exists in a header file","user":{"login":"losemyheaven","id":9379077,"avatar_url":"https://avatars.githubusercontent.com/u/9379077?v=3","gravatar_id":"","url":"https://api.github.com/users/losemyheaven","html_url":"https://github.com/losemyheaven","followers_url":"https://api.github.com/users/losemyheaven/followers","following_url":"https://api.github.com/users/losemyheaven/following{/other_user}","gists_url":"https://api.github.com/users/losemyheaven/gists{/gist_id}","starred_url":"https://api.github.com/users/losemyheaven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/losemyheaven/subscriptions","organizations_url":"https://api.github.com/users/losemyheaven/orgs","repos_url":"https://api.github.com/users/losemyheaven/repos","events_url":"https://api.github.com/users/losemyheaven/events{/privacy}","received_events_url":"https://api.github.com/users/losemyheaven/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-09T13:21:35Z","updated_at":"2015-08-09T13:29:23Z","closed_at":"2015-08-09T13:29:23Z","body":"First, thanks YCM developers who makes such a surprising plugin!\r\nBut when I tried YCM, it completes identifiers of the current file, but it does not work for identifiers in header files\r\nI compiled libclang.so from source code, and I copied .ycm_extra_conf.py from:\r\nhttps://github.com/Valloric/ycmd/blob/master/cpp/ycm/.ycm_extra_conf.py\r\nand then I modified flags in .ycm_extra_conf.py.\r\nvim succeeded in load this python script.\r\n\r\nflags = [\r\n'-Wall',\r\n'-Wextra',\r\n'-Werror',\r\n'-Wc++98-compat',\r\n'-Wno-long-long',\r\n'-Wno-variadic-macros',\r\n'-fexceptions',\r\n'-DNDEBUG',\r\n\r\n'-DUSE_CLANG_COMPLETER',\r\n'-std=c99',\r\n'-x',\r\n'c',\r\n'-isystem',\r\n'../BoostParts',\r\n'-isystem',\r\n'/System/Library/Frameworks/Python.framework/Headers',\r\n'-isystem',\r\n'../llvm/include',\r\n'-isystem',\r\n'../llvm/tools/clang/include',\r\n'-I',\r\n'.',\r\n'-I',\r\n'/usr/include/',\r\n'-I',\r\n'./ClangCompleter',\r\n]\r\nThen unfortunately, I found that YCM doesn't complete and identifiers of stdio.h or header file located in current dir, ie '.'\r\n\r\nThe following configuration are added into .vimrc\r\nlet g:ycm_min_num_of_chars_for_completion = 1\r\nlet g:ycm_global_ycm_extra_conf= ''"}}