From 159a8ecdfa6343a63dcfcd3e651201c73ab7eaa7 Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Thu, 3 Oct 2013 14:17:05 -0700 Subject: [PATCH] YcmDiags and ForceCompilation work again --- autoload/youcompleteme.vim | 14 +++----------- plugin/youcompleteme.vim | 1 + python/ycm/youcompleteme.py | 7 ------- 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/autoload/youcompleteme.vim b/autoload/youcompleteme.vim index f50952d4..507b919d 100644 --- a/autoload/youcompleteme.vim +++ b/autoload/youcompleteme.vim @@ -562,6 +562,7 @@ function! youcompleteme#OmniComplete( findstart, base ) endfunction +" TODO: Make this work again function! s:ShowDetailedDiagnostic() py ycm_state.ShowDetailedDiagnostic() endfunction @@ -646,28 +647,19 @@ function! s:ForceCompile() break endif - let getting_completions = pyeval( - \ 'ycm_state.GettingCompletions()' ) - - if !getting_completions - echom "Unable to retrieve diagnostics, see output of `:mes` for possible details." - return 0 - endif - sleep 100m endwhile return 1 endfunction -" TODO: Make this work again. function! s:ForceCompileAndDiagnostics() let compilation_succeeded = s:ForceCompile() if !compilation_succeeded return endif - " call s:UpdateDiagnosticNotifications() + call s:UpdateDiagnosticNotifications() echom "Diagnostics refreshed." endfunction @@ -680,7 +672,7 @@ function! s:ShowDiagnostics() return endif - let diags = pyeval( 'ycm_state.GetDiagnosticsForCurrentFile()' ) + let diags = pyeval( 'ycm_state.GetDiagnosticsFromStoredRequest()' ) if !empty( diags ) call setloclist( 0, diags ) lopen diff --git a/plugin/youcompleteme.vim b/plugin/youcompleteme.vim index 939d2dea..4cc56f36 100644 --- a/plugin/youcompleteme.vim +++ b/plugin/youcompleteme.vim @@ -77,6 +77,7 @@ let g:ycm_filetype_blacklist = \ get( g:, 'ycm_filetype_blacklist', \ get( g:, 'ycm_filetypes_to_completely_ignore', { \ 'notes' : 1, + \ 'qf': 1, \ 'markdown' : 1, \ 'text' : 1, \ 'unite' : 1, diff --git a/python/ycm/youcompleteme.py b/python/ycm/youcompleteme.py index 2f691f72..66ebd111 100644 --- a/python/ycm/youcompleteme.py +++ b/python/ycm/youcompleteme.py @@ -201,13 +201,6 @@ class YouCompleteMe( object ): pass - # TODO: Make this work again. - def GettingCompletions( self ): - # if self.FiletypeCompletionUsable(): - # return self.GetFiletypeCompleter().GettingCompletions() - return False - - def DebugInfo( self ): debug_info = BaseRequest.PostDataToHandler( BuildRequestData(), 'debug_info' )