diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2014-05-19 10:46:18 -0400 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-05-19 10:47:51 -0400 |
commit | 32d018b57edbc75d6a70c5cd3e8012d7f924f460 (patch) | |
tree | d5db5d632eb92e3354cd561b20b6267b122daee1 | |
parent | 080f5dbd95942dcef47c61349ce69fb42cbafc2a (diff) | |
parent | 1f84a4f8117a5549ddc02e1d230d5b799b32ad59 (diff) | |
download | rneovim-32d018b57edbc75d6a70c5cd3e8012d7f924f460.tar.gz rneovim-32d018b57edbc75d6a70c5cd3e8012d7f924f460.tar.bz2 rneovim-32d018b57edbc75d6a70c5cd3e8012d7f924f460.zip |
Merge #735 'nvim namespace fixes regarding YouCompleteMe'
-rw-r--r-- | contrib/YouCompleteMe/ycm_extra_conf.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/contrib/YouCompleteMe/ycm_extra_conf.py b/contrib/YouCompleteMe/ycm_extra_conf.py index 9fd2ba8b8d..249220bb2b 100644 --- a/contrib/YouCompleteMe/ycm_extra_conf.py +++ b/contrib/YouCompleteMe/ycm_extra_conf.py @@ -1,5 +1,6 @@ # .ycm_extra_conf.py for nvim source code. -import os, ycm_core +import os +import ycm_core def DirectoryOfThisScript(): @@ -7,7 +8,7 @@ def DirectoryOfThisScript(): def GetDatabase(): - compilation_database_folder = DirectoryOfThisScript() + '/../build' + compilation_database_folder = DirectoryOfThisScript() + '/../../build' if os.path.exists(compilation_database_folder): return ycm_core.CompilationDatabase(compilation_database_folder) return None @@ -24,9 +25,9 @@ def GetCompilationInfoForFile(filename): return None if IsHeaderFile(filename): basename = os.path.splitext(filename)[0] - replacement_file = basename + '.c' - if os.path.exists(replacement_file): - compilation_info = database.GetCompilationInfoForFile(replacement_file) + c_file = basename + '.c' + if os.path.exists(c_file): + compilation_info = database.GetCompilationInfoForFile(c_file) if compilation_info.compiler_flags_: return compilation_info return None |