From c1ff300d4fb51e3f4a5aa1ff57e4ded3ca01fa45 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Mon, 4 Mar 2019 10:01:37 -0800 Subject: [PATCH] default config for cpp ycm --- .vim/plugins.vim | 1 + .vim/ycm.py | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 .vim/ycm.py diff --git a/.vim/plugins.vim b/.vim/plugins.vim index 52f320d..8b27fb8 100644 --- a/.vim/plugins.vim +++ b/.vim/plugins.vim @@ -33,3 +33,4 @@ let g:rooter_silent_chdir = 1 " YouCompleteMe let g:ycm_check_if_ycm_core_present = 0 let g:ycm_confirm_extra_conf = 0 +let g:ycm_global_ycm_extra_conf = $HOME.'/.vim/ycm.py' diff --git a/.vim/ycm.py b/.vim/ycm.py new file mode 100644 index 0000000..af0f667 --- /dev/null +++ b/.vim/ycm.py @@ -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 + }