From: Daniel Viberg Date: Tue, 19 Dec 2023 13:58:43 +0000 (+0100) Subject: Changed default value of missing workspaceConfig from [{}] to [null] X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=74f20e2cb0903205e27a4b0d4f72cf21b003408e;p=vim-lsp.git Changed default value of missing workspaceConfig from [{}] to [null] --- diff --git a/autoload/lsp/handlers.vim b/autoload/lsp/handlers.vim index 2ecf525..d921099 100644 --- a/autoload/lsp/handlers.vim +++ b/autoload/lsp/handlers.vim @@ -171,6 +171,15 @@ enddef def ProcessWorkspaceConfiguration(lspserver: dict, request: dict) var items = request.params.items var response = items->map((_, item) => lspserver.workspaceConfigGet(item)) + + # Server expect null value if no config is given + # TODO: Proper null return from workspaceConfigGet if no config is found + if response->type() == v:t_list + && response[0]->type() == v:t_dict + && response[0] == null_dict + response[0] = null + endif + lspserver.sendResponse(request, response, {}) enddef