From fff4facdc47a0c8d088256af4d07c792b38b4a03 Mon Sep 17 00:00:00 2001 From: Michael Lingelbach Date: Sun, 3 Jan 2021 11:31:09 -0800 Subject: LSP: fix messageRequest to not return nested title (#13674) * LSP: fix window/showMessageRequest to not return nested title * Add window/showMessageRequest handler to docs --- runtime/doc/lsp.txt | 1 + runtime/lua/vim/lsp/handlers.lua | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'runtime') diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt index 02d41e7f53..6ca7b52fff 100644 --- a/runtime/doc/lsp.txt +++ b/runtime/doc/lsp.txt @@ -176,6 +176,7 @@ specification. These LSP requests/notifications are defined by default: textDocument/typeDefinition* window/logMessage window/showMessage + window/showMessageRequest workspace/applyEdit workspace/symbol diff --git a/runtime/lua/vim/lsp/handlers.lua b/runtime/lua/vim/lsp/handlers.lua index de00d36188..87f35363b1 100644 --- a/runtime/lua/vim/lsp/handlers.lua +++ b/runtime/lua/vim/lsp/handlers.lua @@ -93,10 +93,7 @@ M['window/showMessageRequest'] = function(_, _, params) if choice < 1 or choice > #actions then return vim.NIL else - local action_chosen = actions[choice] - return { - title = action_chosen; - } + return actions[choice] end end -- cgit