summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/completion.vim8
1 files changed, 7 insertions, 1 deletions
diff --git a/autoload/ale/completion.vim b/autoload/ale/completion.vim
index 2556d50c..9dd913f5 100644
--- a/autoload/ale/completion.vim
+++ b/autoload/ale/completion.vim
@@ -360,12 +360,18 @@ function! ale#completion#ParseLSPCompletions(response) abort
let l:kind = 'v'
endif
+ let l:doc = get(l:item, 'documentation', '')
+
+ if type(l:doc) is v:t_dict && has_key(l:doc, 'value')
+ let l:doc = l:doc.value
+ endif
+
call add(l:results, {
\ 'word': l:word,
\ 'kind': l:kind,
\ 'icase': 1,
\ 'menu': get(l:item, 'detail', ''),
- \ 'info': get(l:item, 'documentation', ''),
+ \ 'info': (type(l:doc) is v:t_string ? l:doc : ''),
\})
endfor