我正在vim上使用YouCompleteMe(YCM)。我安装了Vi Vim stack exchange中所述的插件。我没有使用虚拟环境。
当光标在sympy对象后的点之后时,符号YCM会像字符串一样提示补全。在numpy数组之后,YCM不执行任何操作。但是它YCM完成了非常好的模块和本地定义的类。
我设置了let g:ycm_log_level = 'debug'
并在YCM守护程序的stderr中寻找输出。我做ps ax | grep ycm
时得到了这样的文件,其输出如下:
ycmd --port=34669 --options_file=/tmp/tmp1iwpcvte --log=debug --idle_suicide_seconds=1800 --stdout=/tmp/ycmd_34669_stdout_hetlorin.log --stderr=/tmp/ycmd_34669_stderr_pqjo1who.log
在此类文件中,在numpy数组var之后要求完成后出现以下几行
2019-01-02 21:23:22,403 - INFO - Received event notification
2019-01-02 21:23:22,404 - DEBUG - Event name: CurrentIdentifierFinished
2019-01-02 21:23:22,407 - INFO - Received completion request
2019-01-02 21:23:22,408 - DEBUG - Using filetype completion: True
2019-01-02 21:23:22,409 - DEBUG - diff parser start
2019-01-02 21:23:22,409 - DEBUG - diff parser calculated
2019-01-02 21:23:22,409 - DEBUG - diff: line_lengths old: 28, new: 28
2019-01-02 21:23:22,409 - DEBUG - diff code[equal] old[1:26] new[1:26]
2019-01-02 21:23:22,410 - DEBUG - diff actually copy 1 to 25
2019-01-02 21:23:22,410 - DEBUG - parse_part from 26 to 27 (to 27 in part parser)
2019-01-02 21:23:22,410 - DEBUG - diff code[replace] old[27:27] new[27:27]
2019-01-02 21:23:22,410 - DEBUG - diff code[equal] old[28:28] new[28:28]
2019-01-02 21:23:22,410 - DEBUG - diff parser end
2019-01-02 21:23:23,197 - INFO - Received completion request
2019-01-02 21:23:23,197 - DEBUG - Using filetype completion: True
在numpy数组var之后要求完成后的以下几行
2019-01-02 21:16:01,902 - INFO - Received completion request
2019-01-02 21:16:01,903 - DEBUG - Using filetype completion: True
我不知道这可能是什么。有人有主意吗?