From: Yegappan Lakshmanan <4298407+yegappan@users.noreply.github.com> Date: Sun, 21 May 2023 18:59:32 +0000 (-0700) Subject: Merge branch 'main' into customrequesthandlers X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=309a50b264b5290878dde811502737784c70adf4;p=vim-lsp.git Merge branch 'main' into customrequesthandlers --- 309a50b264b5290878dde811502737784c70adf4 diff --cc autoload/lsp/handlers.vim index cc12626,d369ebc..b79f2ef --- a/autoload/lsp/handlers.vim +++ b/autoload/lsp/handlers.vim @@@ -191,14 -195,22 +191,22 @@@ export def ProcessRequest(lspserver: di 'window/workDoneProgress/create': ProcessWorkDoneProgressCreate, 'client/registerCapability': ProcessClientRegisterCap, 'client/unregisterCapability': ProcessClientUnregisterCap, - 'workspace/configuration': ProcessWorkspaceConfiguration, - 'workspace/codeLens/refresh': ProcessUnsupportedReq, - 'workspace/semanticTokens/refresh': ProcessUnsupportedReq + 'workspace/configuration': ProcessWorkspaceConfiguration } + # Explicitly ignored requests + var lspIgnoredRequestHandlers: list = + [ + # Eclipse java language server sends the 'workspace/executeClientCommand' + # request (to reload bundles) which is not in the LSP specification. + 'workspace/executeClientCommand', + ] + if lspRequestHandlers->has_key(request.method) lspRequestHandlers[request.method](lspserver, request) + elseif lspserver.customRequestHandlers->has_key(request.method) + lspserver.customRequestHandlers[request.method](lspserver, request) - else + elseif lspIgnoredRequestHandlers->index(request.method) == -1 util.ErrMsg($'Unsupported request message received from the LSP server ({lspserver.path}), message = {request->string()}') endif enddef