ycm-core / YouCompleteMe

A code-completion engine for Vim
http://ycm-core.github.io/YouCompleteMe/
GNU General Public License v3.0
25.45k stars 2.81k forks source link

g:ycm_collect_identifiers_from_tags_files = 1 do not work #1850

Closed haolongzhangm closed 8 years ago

haolongzhangm commented 8 years ago

1: env: ubuntu 14.04 64, 2: make ctags -R at dir of linux kernel source dir 3: let g:ycm_collect_identifiers_from_tags_files = 1 in my ~/.vimrc 4:set tags=$PWD/tags 5: modify a file of linux kernel : vim ./ipc/msg.c

result : when I input "rela" , YouCompleteMe seems do not popout "relay_buf_fault" , which can be find at kernel/kernel/relay.c , also "relay_buf_fault" can be find at ctags file

casimir commented 8 years ago

Did you use --fields=+l when calling ctags ? Just got this issue yesterday and that solved it.

(see https://github.com/Valloric/YouCompleteMe#ycm-does-not-read-identifiers-from-my-tags-files)

puremourning commented 8 years ago

fwiw adding a .ycm_extra_conf.py is a much better experience with YCM than relying on tag files. In any case I'm fairly sure that @casimir is right - check the README/faq.

Valloric commented 8 years ago

2: make ctags -R at dir of linux kernel source dir

As others have pointed out, you need --fields=+l as the docs state.