Skip to content

Commit

Permalink
bulletted list
Browse files Browse the repository at this point in the history
  • Loading branch information
davidosomething committed Oct 26, 2024
1 parent 356c4dd commit e223369
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
17 changes: 5 additions & 12 deletions nvim/lua/dko/doctor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,31 +36,24 @@ M.get_all = function()

local errors = M.get_errors()
if #errors > 0 then
table.insert(output, "ᴇʀʀᴏʀs")
table.insert(output, ("%s ᴇʀʀᴏʀs"):format(dkoicons.Error))
table.insert(output, table.concat(errors, "\n"))
end

local warnings = M.get_warnings()
if #warnings > 0 then
table.insert(output, "ᴡᴀʀɴɪɴɢs")
table.insert(output, ("%s ᴡᴀʀɴɪɴɢs"):format(dkoicons.Warn))
table.insert(output, table.concat(warnings, "\n"))
end

return output
end

---@param icon DKOIcon
---@param entry DKODoctorEntry
---@return string
M.format_entry = function(icon, entry)
return ("%s %s"):format(dkoicons[icon], entry.message)
end

M.get_errors = function()
return vim
.iter(M.errors)
:map(function(entry)
return M.format_entry("Error", entry)
return ("%s %s"):format(dkoicons.Bullet, entry.message)
end)
:totable()
end
Expand All @@ -69,7 +62,7 @@ M.get_warnings = function()
return vim
.iter(M.warnings)
:map(function(entry)
return M.format_entry("Warn", entry)
return ("%s %s"):format(dkoicons.Bullet, entry.message)
end)
:totable()
end
Expand Down Expand Up @@ -103,7 +96,7 @@ M.show_float = function()
local opts = vim.tbl_extend("force", {
style = "minimal",
border = "single",
title = "doctor ",
title = "ᴅᴏᴄᴛᴏʀ ",
title_pos = "right",
}, position, size)
local ENTER = false
Expand Down
1 change: 1 addition & 0 deletions nvim/lua/dko/icons.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ local M = {
Hint = "",
Trace = "", -- "✎",
Off = "",
Bullet = "",
}

return M

0 comments on commit e223369

Please sign in to comment.