Use OnBufferVisit in ultisnips completer
This is instead of OnFileReadyToParse which is called every time the users stops typing.
This commit is contained in:
parent
8c0a9bc90e
commit
7500a94cda
@ -205,6 +205,7 @@ function! s:OnBufferVisit()
|
|||||||
|
|
||||||
call s:SetUpCompleteopt()
|
call s:SetUpCompleteopt()
|
||||||
call s:SetCompleteFunc()
|
call s:SetCompleteFunc()
|
||||||
|
py ycm_state.OnBufferVisit()
|
||||||
call s:OnFileReadyToParse()
|
call s:OnFileReadyToParse()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ class UltiSnipsCompleter( GeneralCompleter ):
|
|||||||
return self._filtered_candidates if self._filtered_candidates else []
|
return self._filtered_candidates if self._filtered_candidates else []
|
||||||
|
|
||||||
|
|
||||||
def OnFileReadyToParse( self ):
|
def OnBufferVisit( self ):
|
||||||
self._candidates = _GetCandidates()
|
self._candidates = _GetCandidates()
|
||||||
|
|
||||||
|
|
||||||
|
@ -145,6 +145,13 @@ class YouCompleteMe( object ):
|
|||||||
self.GetFiletypeCompleter().OnBufferDelete( deleted_buffer_file )
|
self.GetFiletypeCompleter().OnBufferDelete( deleted_buffer_file )
|
||||||
|
|
||||||
|
|
||||||
|
def OnBufferVisit( self ):
|
||||||
|
self.gencomp.OnBufferVisit()
|
||||||
|
|
||||||
|
if self.FiletypeCompletionUsable():
|
||||||
|
self.GetFiletypeCompleter().OnBufferVisit()
|
||||||
|
|
||||||
|
|
||||||
def OnInsertLeave( self ):
|
def OnInsertLeave( self ):
|
||||||
self.gencomp.OnInsertLeave()
|
self.gencomp.OnInsertLeave()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user