Skip to content

Commit

Permalink
fix: lsp diagnostics codes
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Dec 15, 2021
1 parent 405f475 commit dbbd523
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/trouble/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ function M.process_item(item, bufnr)
text = vim.trim(item.message:gsub("[\n]", "")):sub(0, vim.o.columns),
full_text = vim.trim(item.message),
type = M.severity[item.severity] or M.severity[0],
code = item.code,
code = item.code or (item.user_data and item.user_data.lsp and item.user_data.lsp.code),
source = item.source,
severity = item.severity or 0,
}
Expand Down

0 comments on commit dbbd523

Please sign in to comment.