How to reduce the time of clang_complete search through boost

Posted by kirill_igum on Stack Overflow See other posts from Stack Overflow or by kirill_igum
Published on 2012-05-10T20:12:29Z Indexed on 2012/08/30 21:38 UTC
Read the original article Hit count: 156

Filed under:
|
|
|

I like using clang with vim.

The one problem that I always have is that whenever I include boost, clang goes through boost library every time I put "." after a an object name. It takes 5-10 seconds.

Since I don't make changes to boost headers, is there a way to cache the search through boost? If not, is there a way to remove boost from the auto-completion search?

update (1) in response to answer by adaszko after :let g:clang_use_library = 1

  1. I type a name of a variable.
  2. I press ^N. Vim starts to search through boost tree. it auto-completes the variable.
  3. i press "." and get the following errors:
Error detected while processing function ClangComplete:
line   35:
Traceback (most recent call last):
Press ENTER or type command to continue
Error detected while processing function ClangComplete:
line   35:
  File "<string>", line 1, in <module>
Press ENTER or type command to continue
Error detected while processing function ClangComplete:
line   35:
NameError: name 'vim' is not defined
Press ENTER or type command to continue
Error detected while processing function ClangComplete:
line   40:
E121: Undefined variable: l:res
Press ENTER or type command to continue
Error detected while processing function ClangComplete:
line   40:
E15: Invalid expression: l:res
Press ENTER or type command to continue
Error detected while processing function ClangComplete:
line   58:
E121: Undefined variable: l:res
Press ENTER or type command to continue
Error detected while processing function ClangComplete:
line   58:
E15: Invalid expression: l:res
Press ENTER or type command to continue

... and there is no auto-compeltion

update (2) not sure if clang_complete should take care of the issue with boost. vim without plugins does search through boost. superuser has an answer to comment out search through boost dirs with set include=^\\s*#\\s*include\ \\(<boost/\\)\\@!

© Stack Overflow or respective owner

Related posts about vim

Related posts about boost