mirror of
https://github.com/neovim/neovim.git
synced 2025-11-30 14:10:50 +00:00
Merge #735 'nvim namespace fixes regarding YouCompleteMe'
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
# .ycm_extra_conf.py for nvim source code.
|
# .ycm_extra_conf.py for nvim source code.
|
||||||
import os, ycm_core
|
import os
|
||||||
|
import ycm_core
|
||||||
|
|
||||||
|
|
||||||
def DirectoryOfThisScript():
|
def DirectoryOfThisScript():
|
||||||
@@ -7,7 +8,7 @@ def DirectoryOfThisScript():
|
|||||||
|
|
||||||
|
|
||||||
def GetDatabase():
|
def GetDatabase():
|
||||||
compilation_database_folder = DirectoryOfThisScript() + '/../build'
|
compilation_database_folder = DirectoryOfThisScript() + '/../../build'
|
||||||
if os.path.exists(compilation_database_folder):
|
if os.path.exists(compilation_database_folder):
|
||||||
return ycm_core.CompilationDatabase(compilation_database_folder)
|
return ycm_core.CompilationDatabase(compilation_database_folder)
|
||||||
return None
|
return None
|
||||||
@@ -24,9 +25,9 @@ def GetCompilationInfoForFile(filename):
|
|||||||
return None
|
return None
|
||||||
if IsHeaderFile(filename):
|
if IsHeaderFile(filename):
|
||||||
basename = os.path.splitext(filename)[0]
|
basename = os.path.splitext(filename)[0]
|
||||||
replacement_file = basename + '.c'
|
c_file = basename + '.c'
|
||||||
if os.path.exists(replacement_file):
|
if os.path.exists(c_file):
|
||||||
compilation_info = database.GetCompilationInfoForFile(replacement_file)
|
compilation_info = database.GetCompilationInfoForFile(c_file)
|
||||||
if compilation_info.compiler_flags_:
|
if compilation_info.compiler_flags_:
|
||||||
return compilation_info
|
return compilation_info
|
||||||
return None
|
return None
|
||||||
|
|||||||
Reference in New Issue
Block a user