Skip to content

Commit 46296f8

Browse files
committed
feat: Add callback parameter to LspRequestCustom
This change allows to provide callback function to custom requests.
1 parent 21cd185 commit 46296f8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

autoload/lsp/lspserver.vim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,13 +1041,14 @@ enddef
10411041
# Name: name of the server
10421042
# Request: any
10431043
# Params: any
1044-
def g:LspRequestCustom(name: string, msg: string, params: any): string
1044+
# Cbfunc: callback function
1045+
def g:LspRequestCustom(name: string, msg: string, params: any, Cbfunc: func): string
10451046
var lspserver: dict<any> = buf.CurbufGetServerByName(name)
10461047
if lspserver->empty()
10471048
return ''
10481049
endif
10491050

1050-
lspserver.rpc_a(msg, params, WorkspaceExecuteReply)
1051+
lspserver.rpc_a(msg, params, Cbfunc)
10511052
return ''
10521053
enddef
10531054

0 commit comments

Comments
 (0)