default config for cpp ycm

This commit is contained in:
Alex Yatskov 2019-03-04 10:01:37 -08:00
parent dc364e5bde
commit c1ff300d4f
2 changed files with 19 additions and 0 deletions

View File

@ -33,3 +33,4 @@ let g:rooter_silent_chdir = 1
" YouCompleteMe " YouCompleteMe
let g:ycm_check_if_ycm_core_present = 0 let g:ycm_check_if_ycm_core_present = 0
let g:ycm_confirm_extra_conf = 0 let g:ycm_confirm_extra_conf = 0
let g:ycm_global_ycm_extra_conf = $HOME.'/.vim/ycm.py'

18
.vim/ycm.py Normal file
View File

@ -0,0 +1,18 @@
def FlagsForFile(filename, **kwargs):
flags = [
'-Wall',
'-Wextra',
'-Werror'
'-pedantic',
'-I',
'.',
'-isystem',
'/usr/include',
'-xc++',
'-std=c++11'
]
return {
'flags': flags,
'do_cache': True
}