From 16170d22daf82f6b57b493bd97570759a545700e Mon Sep 17 00:00:00 2001
From: Goran Zuzic <goran.zuzic@memgraph.io>
Date: Tue, 8 Aug 2017 15:50:17 +0200
Subject: [PATCH] Set .ycm_extra_config to work with other editors

Reviewers: mislav.bradac

Reviewed By: mislav.bradac

Differential Revision: https://phabricator.memgraph.io/D645
---
 .ycm_extra_conf.py | 3 +++
 1 file changed, 3 insertions(+)

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