mirror of
https://github.com/dense-analysis/ale
synced 2025-01-27 18:23:25 +00:00
Merge pull request #2780 from jeremija/tsserver-autoimport-desc
Show description of autoimport action for tsserver
This commit is contained in:
commit
7b38e97943
@ -314,6 +314,10 @@ function! ale#completion#ParseTSServerCompletionEntryDetails(response) abort
|
|||||||
for l:suggestion in a:response.body
|
for l:suggestion in a:response.body
|
||||||
let l:displayParts = []
|
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
|
for l:part in l:suggestion.displayParts
|
||||||
call add(l:displayParts, l:part.text)
|
call add(l:displayParts, l:part.text)
|
||||||
endfor
|
endfor
|
||||||
|
@ -122,13 +122,13 @@ Execute(Entries without details should be included in the responses):
|
|||||||
\ [
|
\ [
|
||||||
\ {
|
\ {
|
||||||
\ 'word': 'abc',
|
\ 'word': 'abc',
|
||||||
\ 'menu': '(property) Foo.abc: number',
|
\ 'menu': 'import { def } from "./Foo"; (property) Foo.abc: number',
|
||||||
\ 'info': '',
|
\ 'info': '',
|
||||||
\ 'kind': 'f',
|
\ 'kind': 'f',
|
||||||
\ 'icase': 1,
|
\ 'icase': 1,
|
||||||
\ 'user_data': json_encode({
|
\ 'user_data': json_encode({
|
||||||
\ 'codeActions': [{
|
\ 'codeActions': [{
|
||||||
\ 'description': 'abc action',
|
\ 'description': 'import { def } from "./Foo";',
|
||||||
\ 'changes': [],
|
\ 'changes': [],
|
||||||
\ }],
|
\ }],
|
||||||
\ }),
|
\ }),
|
||||||
@ -168,7 +168,7 @@ Execute(Entries without details should be included in the responses):
|
|||||||
\ {'text': 'number'},
|
\ {'text': 'number'},
|
||||||
\ ],
|
\ ],
|
||||||
\ 'codeActions': [{
|
\ 'codeActions': [{
|
||||||
\ 'description': 'abc action',
|
\ 'description': 'import { def } from "./Foo";',
|
||||||
\ 'changes': [],
|
\ 'changes': [],
|
||||||
\ }],
|
\ }],
|
||||||
\ },
|
\ },
|
||||||
|
Loading…
Reference in New Issue
Block a user