mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-05 11:18:26 +00:00
fix(picker.icons): fix typo in Nerd Fonts and display the full category name (#716)
## Description Thanks for the icons picker 🙇🏼 I had one in my dotfiles I was going to contribute, but you have been faster. So there it is, I added some things I had in mine This PR: - fix a typo in the Nerd Fonts source name (its plural) - add The category full names to be consistent with emojis <!-- Describe the big picture of your changes to communicate to the maintainers why we should accept this pull request. --> ## Related Issue(s) <!-- If this PR fixes any issues, please link to the issue here. - Fixes #<issue_number> --> ## Screenshots  <!-- Add screenshots of the changes if applicable. --> > [!NOTE] > Would you be interested in some extra sources I was working on ? At least Math and Box drawing ? > [!NOTE] > I would also switch the name the source so Source can be capitalize like the Category and I think having Source > Category after is easier to read as the glyph and the icons are actuelly what people search. But this is personal taste, sp I did not submnitted this change
This commit is contained in:
parent
202e717ce4
commit
a4b0a85e3b
1 changed files with 18 additions and 2 deletions
|
@ -1,5 +1,21 @@
|
|||
local M = {}
|
||||
|
||||
local NERDFONTS_SETS = {
|
||||
cod = "Codicons",
|
||||
dev = "Devicons",
|
||||
fa = "Font Awesome",
|
||||
fae = "Font Awesome Extension",
|
||||
iec = "IEC Power Symbols",
|
||||
linux = "Font Logos",
|
||||
logos = "Font Logos",
|
||||
oct = "Octicons",
|
||||
ple = "Powerline Extra",
|
||||
pom = "Pomicons",
|
||||
seti = "Seti-UI",
|
||||
weather = "Weather Icons",
|
||||
md = "Material Design Icons",
|
||||
}
|
||||
|
||||
---@type table<string, {url: string, v?:number, build: fun(data:table):snacks.picker.Icon[]}>
|
||||
M.sources = {
|
||||
nerd_fonts = {
|
||||
|
@ -17,8 +33,8 @@ M.sources = {
|
|||
table.insert(ret, {
|
||||
name = icon,
|
||||
icon = info.char,
|
||||
source = "nerd font",
|
||||
category = font,
|
||||
source = "nerd fonts",
|
||||
category = NERDFONTS_SETS[font] or font,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue