From c0e70e1fa538dcccdfa465b73c336a7112d29c6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eliseo=20Marti=CC=81nez?= Date: Mon, 19 May 2014 16:20:59 +0200 Subject: [PATCH 1/2] Introduce vim namespace: Contrib YCM: Fix build dir calculation. Build directory calculation had not been correctly updated in #716. --- contrib/YouCompleteMe/ycm_extra_conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/YouCompleteMe/ycm_extra_conf.py b/contrib/YouCompleteMe/ycm_extra_conf.py index 9fd2ba8b8d..8c013598cc 100644 --- a/contrib/YouCompleteMe/ycm_extra_conf.py +++ b/contrib/YouCompleteMe/ycm_extra_conf.py @@ -7,7 +7,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 From 1f84a4f8117a5549ddc02e1d230d5b799b32ad59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eliseo=20Marti=CC=81nez?= Date: Mon, 19 May 2014 16:21:50 +0200 Subject: [PATCH 2/2] Introduce vim namespace: Contrib YCM: Fix style issues. Python-mode signaled a couple of issues here: - Multiple imports on same line. - Line too long. --- contrib/YouCompleteMe/ycm_extra_conf.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/contrib/YouCompleteMe/ycm_extra_conf.py b/contrib/YouCompleteMe/ycm_extra_conf.py index 8c013598cc..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(): @@ -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