summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autoload/ale/completion.vim4
-rw-r--r--test/completion/test_tsserver_completion_parsing.vader6
2 files changed, 7 insertions, 3 deletions
diff --git a/autoload/ale/completion.vim b/autoload/ale/completion.vim
index 94e85916..177a6acb 100644
--- a/autoload/ale/completion.vim
+++ b/autoload/ale/completion.vim
@@ -314,6 +314,10 @@ function! ale#completion#ParseTSServerCompletionEntryDetails(response) abort
for l:suggestion in a:response.body
let l:displayParts = []
+ for l:action in get(l:suggestion, 'codeActions', [])
+ call add(l:displayParts, l:action.description . ' ')
+ endfor
+
for l:part in l:suggestion.displayParts
call add(l:displayParts, l:part.text)
endfor
diff --git a/test/completion/test_tsserver_completion_parsing.vader b/test/completion/test_tsserver_completion_parsing.vader
index 02f287a9..dbb8de32 100644
--- a/test/completion/test_tsserver_completion_parsing.vader
+++ b/test/completion/test_tsserver_completion_parsing.vader
@@ -122,13 +122,13 @@ Execute(Entries without details should be included in the responses):
\ [
\ {
\ 'word': 'abc',
- \ 'menu': '(property) Foo.abc: number',
+ \ 'menu': 'import { def } from "./Foo"; (property) Foo.abc: number',
\ 'info': '',
\ 'kind': 'f',
\ 'icase': 1,
\ 'user_data': json_encode({
\ 'codeActions': [{
- \ 'description': 'abc action',
+ \ 'description': 'import { def } from "./Foo";',
\ 'changes': [],
\ }],
\ }),
@@ -168,7 +168,7 @@ Execute(Entries without details should be included in the responses):
\ {'text': 'number'},
\ ],
\ 'codeActions': [{
- \ 'description': 'abc action',
+ \ 'description': 'import { def } from "./Foo";',
\ 'changes': [],
\ }],
\ },