diff options
author | w0rp <w0rp@users.noreply.github.com> | 2019-10-18 15:16:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-18 15:16:54 +0100 |
commit | 9125ec8739f58941a5d6306d51f69d677849efcb (patch) | |
tree | 648878cb418bff2eafa6bd53e236b28e105c4add /autoload | |
parent | 99e64ed0840526dfae47fa19bd88b7d22616e891 (diff) | |
parent | 8698c44e2a65357518eb59d0f5e33498082a3198 (diff) | |
download | ale-9125ec8739f58941a5d6306d51f69d677849efcb.zip |
Merge pull request #2845 from DonnieWest/fixItemDetailsOnEmptySource
Fix tsserver not returning details for items with empty source
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/completion.vim | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/autoload/ale/completion.vim b/autoload/ale/completion.vim index 63e2247c..fb87f1bb 100644 --- a/autoload/ale/completion.vim +++ b/autoload/ale/completion.vim @@ -492,10 +492,17 @@ function! ale#completion#HandleTSServerResponse(conn_id, response) abort let l:identifiers = [] for l:name in l:names - call add(l:identifiers, { + let l:identifier = { \ 'name': l:name.word, - \ 'source': get(l:name, 'source', ''), - \}) + \} + let l:source = get(l:name, 'source', '') + + " Empty source results in no details for the completed item + if !empty(l:source) + call extend(l:identifier, { 'source': l:source }) + endif + + call add(l:identifiers, l:identifier) endfor let b:ale_completion_info.request_id = ale#lsp#Send( |