mirror of
https://github.com/prabirshrestha/vim-lsp.git
synced 2025-12-14 20:35:59 +01:00
add lsp#notification() for proper $/cancel support (#1079)
This commit is contained in:
@@ -1036,7 +1036,7 @@ function! s:request_cancel(ctx) abort
|
||||
if lsp#get_server_status(a:ctx['server_name']) !=# 'running' | return | endif " if server is not running we cant send the request
|
||||
" send the actual cancel request
|
||||
let a:ctx['dispose'] = lsp#callbag#pipe(
|
||||
\ lsp#request(a:ctx['server_name'], {
|
||||
\ lsp#notification(a:ctx['server_name'], {
|
||||
\ 'method': '$/cancelRequest',
|
||||
\ 'params': { 'id': a:ctx['request_id'] },
|
||||
\ }),
|
||||
@@ -1076,6 +1076,12 @@ function! s:send_request_error(ctx, error) abort
|
||||
endfunction
|
||||
" }}}
|
||||
|
||||
" lsp#notification {{{
|
||||
function! lsp#notification(server_name, request) abort
|
||||
return lsp#callbag#lazy(function('s:send_notification', [a:server_name, a:request]))
|
||||
endfunction
|
||||
" }}}
|
||||
|
||||
" omnicompletion
|
||||
function! lsp#complete(...) abort
|
||||
return call('lsp#omni#complete', a:000)
|
||||
|
||||
Reference in New Issue
Block a user