Browse Source

fix completion for clojure-lsp(check type of results)

pull/16/head
Yuta Sakurai 2 years ago
parent
commit
ad407ce80c
  1. 5
      autoload/ddc_vim_lsp.vim

5
autoload/ddc_vim_lsp.vim

@ -9,7 +9,10 @@ function! ddc_vim_lsp#_callback(server, position, id, data) abort
\ 'response': a:data['response'],
\ }
let lspitems = lsp#omni#get_vim_completion_items(l:options)['items']
let isIncomplete = has_key(a:data['response']['result'], 'isIncomplete') ?
let isIncomplete = (
\ type(a:data['response']['result']) == 4
\ && has_key(a:data['response']['result'], 'isIncomplete')
\ ) ?
\ a:data['response']['result']['isIncomplete'] : v:false
call ddc#callback(a:id, {'items': lspitems, 'isIncomplete': isIncomplete})

Loading…
Cancel
Save