We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
LspHover
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
["--->",1,"ls-typescript",{"method":"textDocument/hover","on_notification":"---funcref---","params":{"textDocument":{"uri":"..."},"position":{"character":31,"line":6}}}] ["--->",1,"ls-typescript",{"method":"$/cancelRequest","params":{"id":4}}] ["--->",2,"ls-tailwindcss",{"method":"textDocument/hover","on_notification":"---funcref---","params":{"textDocument":{"uri":"..."},"position":{"character":31,"line":6}}}] ["<---",1,"ls-typescript",{"response":{"id":4,"jsonrpc":"2.0","result":null},"request":{"method":"textDocument/hover","jsonrpc":"2.0","id":4,"params":{"textDocument":{"uri":"..."},"position":{"character":31,"line":6}}}}] ["<---",2,"ls-tailwindcss",{"response":{"id":2,"jsonrpc":"2.0","result":null},"request":{"method":"textDocument/hover","jsonrpc":"2.0","id":2,"params":{"textDocument":{"uri":"..."},"position":{"character":31,"line":6}}}}]
It seems the issue is caused by the flatMap operator: when the next source subscribes, it cancels previous source.
flatMap
vim-lsp/autoload/lsp/internal/document_hover/under_cursor.vim
Lines 63 to 74 in 04428c9
Here is a minimal reproducible example using callbag.vim:
function s:source(ctx, next, error, complete) abort call timer_start(500, {->a:next(a:ctx['value'])}) call timer_start(1000, {->a:complete()}) return function('s:cleanup', [a:ctx]) endfunction function s:create(v) abort let l:ctx = { \ 'value': a:v, \} return callbag#create(function('s:source', [l:ctx])) endfunction function s:cleanup(ctx) abort call s:log('clear: ' .. a:ctx['value']) endfunction function s:log(message) abort echom a:message endfunction call callbag#pipe( \ callbag#fromList(['foo', 'bar']), \ callbag#flatMap({x->s:create(x)}), \ callbag#tap({x->s:log('value: ' .. x)}), \ callbag#subscribe({ \ 'next': {x->s:log('value received')}, \ 'error': {e->s:log(e)}, \ 'complete': {->s:log('complete')}, \}), \)
Expected output:
value: foo value received value: bar value received complete
Actual output:
clear: foo value: bar value received complete
The text was updated successfully, but these errors were encountered:
No branches or pull requests
It seems the issue is caused by the
flatMap
operator: when the next source subscribes, it cancels previous source.vim-lsp/autoload/lsp/internal/document_hover/under_cursor.vim
Lines 63 to 74 in 04428c9
Here is a minimal reproducible example using callbag.vim:
Expected output:
Actual output:
The text was updated successfully, but these errors were encountered: