summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/lvim/lsp/config.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/lvim/lsp/config.lua b/lua/lvim/lsp/config.lua
index fb59ca51..3d62461d 100644
--- a/lua/lvim/lsp/config.lua
+++ b/lua/lvim/lsp/config.lua
@@ -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