Skip to content

How to set the custom diagnostic icons #2020

Answered by nenahp
liuhq asked this question in Q&A
Discussion options

You must be logged in to vote

Looks like this is set by vim.diagnostics.config

local sign_confs = vim.diagnostic.config().signs
local level = vim.diagnostic.severity[k:upper()]
if type(sign_confs) ~= "table" or utils.tbl_isempty(sign_confs) then sign_confs = nil end
opts.__signs[v.severity].text =
(not opts.diag_icons or not sign_confs or not sign_confs.text or not sign_confs.text[level])
and v.default or vim.trim(sign_confs.text[level])
opts.__signs[v.severity].texthl = v.name
.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@ibhagwan
Comment options

@liuhq
Comment options

Answer selected by liuhq
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants