Skip to content

Commit

Permalink
complete: fix got definition issue
Browse files Browse the repository at this point in the history
Signed-off-by: tracyone <[email protected]>
  • Loading branch information
tracyone committed Oct 9, 2023
1 parent d75a91e commit cef5a91
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions autoload/te/complete.vim
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,17 @@ function! te#complete#goto_def(open_type) abort
return 0
endif
endif
if get(g:, 'feat_enable_complete', 0)
if g:complete_plugin_type.cur_val ==# 'YouCompleteMe'
let l:ret=s:YcmGotoDef()
endif

if get(g:, 'feat_enable_complete', 0) &&
\ g:complete_plugin_type.cur_val ==# 'YouCompleteMe'
let l:ret=s:YcmGotoDef()
elseif get(g:, 'feat_enable_lsp') == 1
let l:ret=te#lsp#gotodefinion()
else
let l:ret = -1
endif


if te#env#SupportTimer() && l:ret == 0
call timer_start(200, function('te#complete#cstag'), {'repeat': 1})
elseif l:ret < 0
Expand Down

0 comments on commit cef5a91

Please sign in to comment.