From 71c72c34091da9bd920d38b2a26d90ab23cad580 Mon Sep 17 00:00:00 2001 From: Maria Solano Date: Thu, 21 May 2026 19:00:02 -0700 Subject: [PATCH] fix(lsp): validate that `workspace_edit` isn't `nil` (#39947) --- runtime/lua/vim/lsp/util.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua index 111ce83f71..085dd0f7f6 100644 --- a/runtime/lua/vim/lsp/util.lua +++ b/runtime/lua/vim/lsp/util.lua @@ -536,6 +536,7 @@ end ---@param position_encoding 'utf-8'|'utf-16'|'utf-32' (required) ---@see https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_applyEdit function M.apply_workspace_edit(workspace_edit, position_encoding) + vim.validate('workspace_edit', workspace_edit, 'table') vim.validate('position_encoding', position_encoding, 'string') if workspace_edit.documentChanges then