mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 11:26:37 +00:00
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
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user