configuration/config/nvim/ycm_extra_conf.py

14 lines
324 B
Python

def FlagsForFile(filename, **kwargs):
c = filename.endswith('.c')
flags = [
'-Wall',
'-Wextra',
'-Werror',
'-DNDEBUG',
'-std=c99' if c else '-std=c++11',
'-x', 'c' if c else 'c++',
'-isystem', '/usr/include',
]
return dict(flags=flags, do_cache=True)