From 0cdb58820796453bb8e2ce23e76996a540532955 Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Tue, 3 Jun 2014 14:49:53 -0700 Subject: [PATCH] Updating to latest ycmd Diagnostic & completion 'kind' changed in the REST API. --- python/ycm/base.py | 2 +- python/ycm/client/completion_request.py | 3 ++- python/ycm/diagnostic_interface.py | 2 +- python/ycm/vimsupport.py | 2 +- third_party/ycmd | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/python/ycm/base.py b/python/ycm/base.py index 56034cf3..f98ae3aa 100644 --- a/python/ycm/base.py +++ b/python/ycm/base.py @@ -178,7 +178,7 @@ def OverlapLength( left_string, right_string ): length += 1 -COMPATIBLE_WITH_CORE_VERSION = 10 +COMPATIBLE_WITH_CORE_VERSION = 11 def CompatibleWithYcmCore(): try: diff --git a/python/ycm/client/completion_request.py b/python/ycm/client/completion_request.py index 0e444316..b6700155 100644 --- a/python/ycm/client/completion_request.py +++ b/python/ycm/client/completion_request.py @@ -62,7 +62,8 @@ def _ConvertCompletionDataToVimData( completion_data ): if 'extra_menu_info' in completion_data: vim_data[ 'menu' ] = ToUtf8IfNeeded( completion_data[ 'extra_menu_info' ] ) if 'kind' in completion_data: - vim_data[ 'kind' ] = ToUtf8IfNeeded( completion_data[ 'kind' ] ) + vim_data[ 'kind' ] = ToUtf8IfNeeded( + completion_data[ 'kind' ] )[ 0 ].lower() if 'detailed_info' in completion_data: vim_data[ 'info' ] = ToUtf8IfNeeded( completion_data[ 'detailed_info' ] ) diff --git a/python/ycm/diagnostic_interface.py b/python/ycm/diagnostic_interface.py index 3cbc2181..f58baf9d 100644 --- a/python/ycm/diagnostic_interface.py +++ b/python/ycm/diagnostic_interface.py @@ -138,5 +138,5 @@ def _ConvertDiagListToDict( diag_list ): def _DiagnosticIsError( diag ): - return diag[ 'kind' ] == 'E' + return diag[ 'kind' ] == 'ERROR' diff --git a/python/ycm/vimsupport.py b/python/ycm/vimsupport.py index 3ea3da22..dde51e60 100644 --- a/python/ycm/vimsupport.py +++ b/python/ycm/vimsupport.py @@ -218,7 +218,7 @@ def ConvertDiagnosticsToQfList( diagnostics ): 'lnum' : line_num, 'col' : location[ 'column_num' ] + 1, 'text' : ToUtf8IfNeeded( diagnostic[ 'text' ] ), - 'type' : diagnostic[ 'kind' ], + 'type' : diagnostic[ 'kind' ][ 0 ], 'valid' : 1 } diff --git a/third_party/ycmd b/third_party/ycmd index fc7abe89..660c9210 160000 --- a/third_party/ycmd +++ b/third_party/ycmd @@ -1 +1 @@ -Subproject commit fc7abe8948c0dc279cd2a5dd6b5595cb2a2172e3 +Subproject commit 660c921059729eeb135b5b3c9bac40f158223fed