I'd like to use YouCompleteMe with C++ semantic completion, but after hours of trying, I can't find why it doesn't work as expected.
Everything seems to be working but I can't complete function parameters.
I'm running Vim on Archlinux (Gnome Terminal on Openbox):
Linux Arch-PC 4.2.5-1-ARCH #1 SMP PREEMPT Tue Oct 27 08:13:28 CET 2015 x86_64 GNU/Linux
I installed YCM following the instructions (with the install.py
script and clang support). I also tried with AUR YCM package and got the same issue.
YcmDebugInfo
:
Printing YouCompleteMe debug information...
-- Server has Clang support compiled in: True
-- Clang version: clang version 3.7.0 (tags/RELEASE_370/final)
-- Flags for /home/arthur/vimtest/main.cpp loaded from /home/arthur/vimtest/.ycm
_extra_conf.py:
-- ['-x', 'c++', '-Wall', '-isystem', '/home/arthur/.vim/bundle/YouCompleteMe/th
ird_party/ycmd/ycmd/../clang_includes']
-- Server running at: http://127.0.0.1:54555
-- Server process ID: 11520
-- Server logfiles:
-- /tmp/ycm_temp/server_54555_stdout.log
-- /tmp/ycm_temp/server_54555_stderr.log
That's what appears on screen when trying to complete:
I used YCM-Generator for the .ycm_extra_conf.py
.
Am I just missing something stupid due to my lack of Vim knowledge? Seems to be something like bad keyboard shortcuts mapping... but can't figure out what's wrong exactly. This is my .vimrc:
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'mbbill/undotree'
Plugin 'majutsushi/tagbar'
Plugin 'bling/vim-airline'
Plugin 'tpope/vim-fugitive'
Plugin 'vim-scripts/c.vim'
Plugin 'Valloric/YouCompleteMe'
Plugin 'sjl/badwolf'
Plugin 'rdnetto/YCM-Generator'
call vundle#end() " required
filetype plugin on " required
"Settings
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set smartindent
set autoindent
set backspace=indent,eol,start
set background=dark
set shiftround
set ignorecase
set showmode
set ruler
set showcmd
set mouse=a
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
"Plugins Settings :
"badwolf
colorscheme badwolf
"YCM :
let g:ycm_collect_identifiers_from_tags_files = 1
"airline :
set laststatus=2
let g:airline_powerline_fonts = 1
"Shortcuts
nnoremap <F3> :UndotreeToggle<cr>
nnoremap <F4> :TagbarToggle<cr>
nnoremap <F2> :NERDTreeToggle<cr>
syn on
set nu
Thanks for your help!