feat: 'diagnostics.icon_padding' for extra wide icons (#470)

main
bhagwan 2 years ago
parent 248efd1ffc
commit ee19eda2e3

@ -829,10 +829,11 @@ require'fzf-lua'.setup {
}, },
diagnostics ={ diagnostics ={
prompt = 'Diagnostics ', prompt = 'Diagnostics ',
cwd_only = false, -- limit to cwd only? cwd_only = false,
file_icons = true, file_icons = true,
git_icons = false, git_icons = false,
diag_icons = true, diag_icons = true,
icon_padding = '', -- add padding for wide diagnostics signs
-- by default icons and highlights are extracted from 'DiagnosticSignXXX' -- by default icons and highlights are extracted from 'DiagnosticSignXXX'
-- and highlighted by a highlight group of the same name (which is usually -- and highlighted by a highlight group of the same name (which is usually
-- set by your colorscheme, for more info see: -- set by your colorscheme, for more info see:

@ -868,10 +868,11 @@ open an issue and I'll be more than happy to help.**
}, },
diagnostics ={ diagnostics ={
prompt = 'Diagnostics ', prompt = 'Diagnostics ',
cwd_only = false, -- limit to cwd only? cwd_only = false,
file_icons = true, file_icons = true,
git_icons = false, git_icons = false,
diag_icons = true, diag_icons = true,
icon_padding = '', -- add padding for wide diagnostics signs
-- by default icons and highlights are extracted from 'DiagnosticSignXXX' -- by default icons and highlights are extracted from 'DiagnosticSignXXX'
-- and highlighted by a highlight group of the same name (which is usually -- and highlighted by a highlight group of the same name (which is usually
-- set by your colorscheme, for more info see: -- set by your colorscheme, for more info see:

@ -170,7 +170,8 @@ M.diagnostics = function(opts)
if opts.color_icons then if opts.color_icons then
icon = utils.ansi_from_hl(value.texthl, icon) icon = utils.ansi_from_hl(value.texthl, icon)
end end
entry = icon .. utils.nbsp .. utils.nbsp .. entry entry = string.format("%s%s%s%s",
icon, opts.icon_padding or '', utils.nbsp, entry)
end end
fzf_cb(entry, function() coroutine.resume(co) end) fzf_cb(entry, function() coroutine.resume(co) end)
end end

Loading…
Cancel
Save