-
Notifications
You must be signed in to change notification settings - Fork 5
/
ycm_extra_conf.jsondb.py
29 lines (21 loc) · 1004 Bytes
/
ycm_extra_conf.jsondb.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import os
def DirectoryOfThisScript():
return os.path.dirname(os.path.abspath(__file__))
import sys
sys.path.insert(0, DirectoryOfThisScript())
import ycm_jsondb_config
# By default, the compilation database is in the current folder (usually the
# project root). It can be changed from the ycm_jsondb_config sctipt via the
# GetCompilationDatabaseFolder function. If you are using a centralized config
# file and have the compilation database in another place than the current
# folder, then modify it here (but remember not to symlink this file when
# installing).
if "GetCompilationDatabaseFolder" in dir(ycm_jsondb_config):
compilation_database_folder = ycm_jsondb_config.GetCompilationDatabaseFolder(
DirectoryOfThisScript())
else:
compilation_database_folder = DirectoryOfThisScript()
import ycm_jsondb_core
ycm_jsondb_core.Init(compilation_database_folder)
def FlagsForFile(filename, **kwargs):
return ycm_jsondb_core.FlagsForFile(filename, DirectoryOfThisScript())