From bf5708c4225d1680772cc0b6e850362ff2cc923b Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Tue, 24 Sep 2013 14:48:14 -0700 Subject: [PATCH] NativeFiletypeCompletionAvailable works again --- python/ycm/youcompleteme.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/python/ycm/youcompleteme.py b/python/ycm/youcompleteme.py index b30653c2..7a8b58d2 100644 --- a/python/ycm/youcompleteme.py +++ b/python/ycm/youcompleteme.py @@ -27,7 +27,7 @@ from ycm import vimsupport from ycm import utils from ycm.completers.all.omni_completer import OmniCompleter from ycm.completers.general import syntax_parse -from ycm.client.base_request import BaseRequest +from ycm.client.base_request import BaseRequest, BuildRequestData from ycm.client.command_request import SendCommandRequest from ycm.client.completion_request import CompletionRequest from ycm.client.event_notification import SendEventNotificationAsync @@ -103,8 +103,11 @@ class YouCompleteMe( object ): def NativeFiletypeCompletionAvailable( self ): - # TODO: Talk to server about this. - return False + try: + return BaseRequest.PostDataToHandler( BuildRequestData(), + 'filetype_completion_available') + except: + return False # TODO: This may not be needed at all when the server is ready. Evaluate this