diff --git a/.ycm_extra_conf.py b/.ycm_extra_conf.py index f0bb99cab..7862b5a5a 100644 --- a/.ycm_extra_conf.py +++ b/.ycm_extra_conf.py @@ -49,6 +49,9 @@ HEADER_EXTENSIONS = [ '.hh' ] +# set the working directory of YCMD to be this file +os.chdir(os.path.dirname(os.path.realpath(__file__))) + def IsHeaderFile(filename): extension = os.path.splitext(filename)[1] return extension in HEADER_EXTENSIONS