neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 913b05bf630d789d9ca4d51675507505a3394e61
parent 91cb1b182bd9ad9c5a5c47e969b4c41c330ae28d
Author: phanium <91544758+phanen@users.noreply.github.com>
Date:   Mon,  6 Oct 2025 00:00:04 +0800

fix(lsp): format_item should return string (#36025)

Problem: format_item return two value
Solution: `:h vim.ui.select()` say format_item should return string
Diffstat:
Mruntime/lua/vim/lsp/handlers.lua | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 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)