Skip to content

Commit

Permalink
Revert "Check the server end point for available completer"
Browse files Browse the repository at this point in the history
This reverts commit d768447.

Fixes #1529
  • Loading branch information
Valloric committed Jun 11, 2015
1 parent 1f073b1 commit f5e2fc6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 63 deletions.
48 changes: 0 additions & 48 deletions python/ycm/client/completer_available_request.py

This file was deleted.

17 changes: 2 additions & 15 deletions python/ycm/youcompleteme.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
from ycm.diagnostic_interface import DiagnosticInterface
from ycm.omni_completer import OmniCompleter
from ycm import syntax_parse
from ycmd.completers.completer_utils import FiletypeCompleterExistsForFiletype
from ycm.client.ycmd_keepalive import YcmdKeepalive
from ycm.client.base_request import BaseRequest, BuildRequestData
from ycm.client.completer_available_request import SendCompleterAvailableRequest
from ycm.client.command_request import SendCommandRequest
from ycm.client.completion_request import CompletionRequest
from ycm.client.omni_completion_request import OmniCompletionRequest
Expand Down Expand Up @@ -98,7 +98,6 @@ def __init__( self, user_options ):
self._ycmd_keepalive.Start()

def _SetupServer( self ):
self._available_completers = {}
server_port = utils.GetUnusedLocalhostPort()
# The temp options file is deleted by ycmd during startup
with tempfile.NamedTemporaryFile( delete = False ) as options_file:
Expand Down Expand Up @@ -218,20 +217,8 @@ def GetOmniCompleter( self ):
return self._omnicomp


def FiletypeCompleterExistsForFiletype( self, filetype ):
try:
return self._available_completers[ filetype ]
except KeyError:
pass

exists_completer = ( self.IsServerAlive() and
bool( SendCompleterAvailableRequest( filetype ) ) )
self._available_completers[ filetype ] = exists_completer
return exists_completer


def NativeFiletypeCompletionAvailable( self ):
return any( [ self.FiletypeCompleterExistsForFiletype( x ) for x in
return any( [ FiletypeCompleterExistsForFiletype( x ) for x in
vimsupport.CurrentFiletypes() ] )


Expand Down

0 comments on commit f5e2fc6

Please sign in to comment.