How to improve the completion speed of clang_complete?

泪湿孤枕 提交于 2019-12-24 09:00:23

问题


I'm using the plugin clang_complete in Vim. The plugin could complete C++ STL accurately. But its completion speed is unacceptable. Is there any way to improve the clang_complete's completion speed?

update:Yesterday I found this,and now the omnicppcomplete could basically meet my need ,so I decided to continue to use omnicppcomplete.vim. Thak you for your answers!!


回答1:


Well i heard, that using libclang.so instead of clang executable is much faster. However for reliable completion, you need to ignore errors, and im kinda lost in using libclang api. Its really not that easy. I dont know, which version of clang_complete are you using, but there is follow up plugin called same, that is updated until now by some guy. He tried to use libclang and pre-filled databases for speedup - and not only for completing, but also for context sensitive navigating. See here: http://blog.wuwon.id.au/2011/10/vim-plugin-for-navigating-c-with.html

It actually does have some problems, as it doesnt work correctly, when there is something in code, that clang compiler doesnt like. it could be ignored by old clang_complete, but not this version(at least, when you are using libclang, you are free to use also the old clang executable).




回答2:


If you're not using Clang 3.0 (rc) or trunk, you may be using slower code. This has recently been worked on, due to inacceptable performance, so just updating Clang might give you the boost you need.



来源:https://stackoverflow.com/questions/7887831/how-to-improve-the-completion-speed-of-clang-complete

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!