mirror of
https://github.com/dense-analysis/ale.git
synced 2026-02-12 13:11:49 +08:00
Merge pull request #2845 from DonnieWest/fixItemDetailsOnEmptySource
Fix tsserver not returning details for items with empty source
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user