diff --git a/runtime/lua/vim/lsp/handlers.lua b/runtime/lua/vim/lsp/handlers.lua index d6a612b9f6..e088940a9d 100644 --- a/runtime/lua/vim/lsp/handlers.lua +++ b/runtime/lua/vim/lsp/handlers.lua @@ -107,8 +107,10 @@ RSC['window/showMessageRequest'] = function(_, params, ctx) local opts = { kind = 'lsp_message', prompt = params.message .. ': ', + ---@param action lsp.MessageActionItem + ---@return string format_item = function(action) - return (action.title:gsub('\r\n', '\\r\\n')):gsub('\n', '\\n') + return (action.title:gsub('\r\n', '\\r\\n'):gsub('\n', '\\n')) end, } vim.ui.select(params.actions, opts, function(choice)