Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
hubert715
V2EX  ›  Linux

YCM 不能补全第三方库

  •  
  •   hubert715 · Jan 6, 2016 · 5584 views
    This topic created in 3805 days ago, the information mentioned may be changed or developed.

    有用 YCM 的同学在配置好.ycm_extra_conf.py 文件后(已添加 -I 指向自己的 include 文件夹),仍然无法自动补全自己库里的函数吗?

    求指教

    2 replies    2016-01-07 20:48:14 +08:00
    Abercrombie
        1
    Abercrombie  
       Jan 6, 2016
    https://github.com/yangyangwithgnu/use_vim_as_ide
    这个里面有说到这个问题,要先打开对应.h 文件才能在.cpp 里自动补全。
    或者 YCM 开启标签补全引擎,然后导入 tag 文件。
    本文作者也在这里。
    xiaoxuxu
        2
    xiaoxuxu  
       Jan 7, 2016
    不是的,只要.ycm_extra_conf.py 配置正确,直接、间接 include 的.h 都能找到, 并且没有语法错误,应该是打开 cpp 文件,直接就能补全了。
    打开头文件后,再回到 cpp ,那个补全只是机械的字符串前缀匹配的补全,不是 clang 语法补全的。
    可以用:YcmForceCompileAndDiagnostics 看一下错误。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2993 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 14:30 · PVG 22:30 · LAX 07:30 · JFK 10:30
    ♥ Do have faith in what you're doing.