mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 02:38:46 +00:00
feat(picker): added new icons
picker for nerd fonts and emoji. Closes #703
This commit is contained in:
parent
570d2191d5
commit
97898e910d
6 changed files with 138 additions and 2 deletions
|
@ -514,4 +514,19 @@ function M.debug(item, picker)
|
|||
return ret
|
||||
end
|
||||
|
||||
function M.icon(item, picker)
|
||||
local a = Snacks.picker.util.align
|
||||
---@cast item snacks.picker.Icon
|
||||
local ret = {} ---@type snacks.picker.Highlight[]
|
||||
|
||||
ret[#ret + 1] = { a(item.icon, 2), "SnacksPickerIcon" }
|
||||
ret[#ret + 1] = { " " }
|
||||
ret[#ret + 1] = { a(item.source, 10), "SnacksPickerIconSource" }
|
||||
ret[#ret + 1] = { " " }
|
||||
ret[#ret + 1] = { a(item.name, 30), "SnacksPickerIconName" }
|
||||
ret[#ret + 1] = { " " }
|
||||
ret[#ret + 1] = { a(item.category, 8), "SnacksPickerIconCategory" }
|
||||
return ret
|
||||
end
|
||||
|
||||
return M
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue