Removing YCM as omnifunc if no native support
This commit is contained in:
parent
786e6182ff
commit
5d89aef907
@ -194,6 +194,13 @@ function! s:SetCompleteFunc()
|
|||||||
if pyeval( 'ycm_state.NativeFiletypeCompletionUsable()' )
|
if pyeval( 'ycm_state.NativeFiletypeCompletionUsable()' )
|
||||||
let &omnifunc = 'youcompleteme#OmniComplete'
|
let &omnifunc = 'youcompleteme#OmniComplete'
|
||||||
let &l:omnifunc = 'youcompleteme#OmniComplete'
|
let &l:omnifunc = 'youcompleteme#OmniComplete'
|
||||||
|
|
||||||
|
" If we don't have native filetype support but the omnifunc is set to YCM's
|
||||||
|
" omnifunc because the previous file the user was editing DID have native
|
||||||
|
" support, we remove our omnifunc.
|
||||||
|
elseif &omnifunc == 'youcompleteme#OmniComplete'
|
||||||
|
let &omnifunc = ''
|
||||||
|
let &l:omnifunc = ''
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user