Co-authored-by: Alexey Svirshchevskiy <alexey.svirshchevskiy@sitoo.com>
@@ -23,7 +23,7 @@ return {
prefix = "",
format = function(d)
local t = vim.deepcopy(d)
- local code = d.code or d.user_data.lsp.code
+ local code = d.code or (d.user_data and d.user_data.lsp.code)
if code then
t.message = string.format("%s [%s]", t.message, code):gsub("1. ", "")
end