Refactoring out some pointless sys.path changes
This commit is contained in:
parent
468e245bcb
commit
4978546e62
@ -18,7 +18,7 @@
|
||||
# along with YouCompleteMe. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import ycm_core
|
||||
from clang_completer import ClangCompleter
|
||||
from completers.cpp.clang_completer import ClangCompleter
|
||||
|
||||
def GetCompleter():
|
||||
if ycm_core.HasClangSupport():
|
||||
|
@ -20,10 +20,10 @@
|
||||
|
||||
from completers.completer import Completer
|
||||
from completers.all.identifier_completer import IdentifierCompleter
|
||||
from filename_completer import FilenameCompleter
|
||||
from completers.general.filename_completer import FilenameCompleter
|
||||
|
||||
try:
|
||||
from ultisnips_completer import UltiSnipsCompleter
|
||||
from completers.general.ultisnips_completer import UltiSnipsCompleter
|
||||
USE_ULTISNIPS_COMPLETER = True
|
||||
except ImportError:
|
||||
USE_ULTISNIPS_COMPLETER = False
|
||||
|
@ -15,7 +15,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with YouCompleteMe. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from jedi_completer import JediCompleter
|
||||
from completers.python.jedi_completer import JediCompleter
|
||||
|
||||
def GetCompleter():
|
||||
return JediCompleter()
|
||||
|
@ -19,7 +19,6 @@
|
||||
|
||||
import imp
|
||||
import os
|
||||
import sys
|
||||
import vimsupport
|
||||
import vim
|
||||
import ycm_utils as utils
|
||||
@ -85,11 +84,7 @@ class YouCompleteMe( object ):
|
||||
completer = None
|
||||
supported_filetypes = [ filetype ]
|
||||
if os.path.exists( module_path ):
|
||||
|
||||
sys.path.insert( 0, os.path.dirname( module_path ) )
|
||||
module = imp.load_source( filetype, module_path )
|
||||
del sys.path[ 0 ]
|
||||
|
||||
completer = module.GetCompleter()
|
||||
if completer:
|
||||
supported_filetypes.extend( completer.SupportedFiletypes() )
|
||||
|
Loading…
x
Reference in New Issue
Block a user