summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorDonnie West <me@donniewest.com>2019-10-17 21:16:04 -0500
committerDonnie West <me@donniewest.com>2019-10-17 23:26:24 -0500
commit8698c44e2a65357518eb59d0f5e33498082a3198 (patch)
tree2793aa59d6bc448715043998d0d66b704b11e502 /autoload
parentdfe9b7cc2650c03127c5f897767bcb85bc0bad1f (diff)
downloadale-8698c44e2a65357518eb59d0f5e33498082a3198.zip
Fix tsserver not returning details for items with empty source
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/completion.vim13
1 files changed, 10 insertions, 3 deletions
diff --git a/autoload/ale/completion.vim b/autoload/ale/completion.vim
index a15ca514..8b29d848 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(