It's been several days of Ring TFM and googling and I still couldn't figure out how to get the clang completer to work so I must turn to this group.
I'm using Neovim on Arch Linux and my project uses a really simple CMake setup. The project is on
GitHub, it has all relevent files.
My vimrc (well, .config/nvim/init.vim actually) is:
set nocompatible " be iMproved
call plug#begin('~/.config/nvim/plugged')
function! BuildYCM(info)
if a:info.status == 'installed' || a:info.force
" !./install.sh
endif
endfunction
Plug 'Valloric/YouCompleteMe', { 'do': function('BuildYCM') }
call plug#end()
syntax on
let tabsize = 4
execute "set tabstop=".tabsize
execute "set shiftwidth=".tabsize
execute "set softtabstop=".tabsize
set noexpandtab
I'm also pretty sure I compiled the plugin the right way. As far as I remember, I ended up using the setup.py script with --use-system-clang and --clang-completer and it gave no errors.
NVim can find the python script when I open a cpp file, but when I run it, nothing seems to change. I tried completing "SDL_" and "std::", but nothing shows up besides the basic id list from the current file, C-space does nothing.
I also randomly get the following error, which I can't really put anywhere:
AttributeError: 'module' object has no attribute 'FlagsForFile'
It doesn't seem to affect anything, it just appears on the output thingy on the bottom (sorry, I'm pretty new to Vim and haven't got all the terminology memorized yet).
All in all: CMake generates the json file with the build options, how do I make YCM use it and does it matter if the JSON gets modified while nvim is running?
Sorry for being such a noob, but I really can't seem to make this work.