summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autoload/ale/completion.vim4
-rw-r--r--test/completion/test_lsp_completion_parsing.vader6
2 files changed, 5 insertions, 5 deletions
diff --git a/autoload/ale/completion.vim b/autoload/ale/completion.vim
index 7b3a0e82..7440f8cd 100644
--- a/autoload/ale/completion.vim
+++ b/autoload/ale/completion.vim
@@ -336,7 +336,9 @@ function! ale#completion#ParseLSPCompletions(response) abort
endif
" See :help complete-items for Vim completion kinds
- if l:item.kind is s:LSP_COMPLETION_METHOD_KIND
+ if !has_key(l:item, 'kind')
+ let l:kind = 'v'
+ elseif l:item.kind is s:LSP_COMPLETION_METHOD_KIND
let l:kind = 'm'
elseif l:item.kind is s:LSP_COMPLETION_CONSTRUCTOR_KIND
let l:kind = 'm'
diff --git a/test/completion/test_lsp_completion_parsing.vader b/test/completion/test_lsp_completion_parsing.vader
index 736353e3..d5a45b54 100644
--- a/test/completion/test_lsp_completion_parsing.vader
+++ b/test/completion/test_lsp_completion_parsing.vader
@@ -430,10 +430,10 @@ Execute(Should handle Python completion results correctly):
\ }
\ })
-Execute(Should handle missing detail keys):
+Execute(Should handle missing keys):
AssertEqual
\ [
- \ {'word': 'x', 'menu': '', 'info': 'y', 'kind': 'f', 'icase': 1},
+ \ {'word': 'x', 'menu': '', 'info': '', 'kind': 'v', 'icase': 1},
\ ],
\ ale#completion#ParseLSPCompletions({
\ 'jsonrpc': '2.0',
@@ -443,8 +443,6 @@ Execute(Should handle missing detail keys):
\ 'items': [
\ {
\ 'label': 'x',
- \ 'kind': 3,
- \ 'documentation': 'y',
\ },
\ ]
\ }