Skip to content

Commit b836928

Browse files
HeitorAugustoLNkhaneliman
authored andcommitted
plugins/mini-icons: init
1 parent 660939f commit b836928

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{ lib, ... }:
2+
lib.nixvim.plugins.mkNeovimPlugin {
3+
name = "mini-icons";
4+
moduleName = "mini.icons";
5+
packPathName = "mini.icons";
6+
configLocation = lib.mkOrder 800 "extraConfigLua";
7+
8+
maintainers = [ lib.maintainers.HeitorAugustoLN ];
9+
10+
settingsExample = {
11+
style = "glyph";
12+
extension = {
13+
lua = {
14+
hl = "Special";
15+
};
16+
};
17+
file = {
18+
"init.lua" = {
19+
glyph = "";
20+
hl = "MiniIconsGreen";
21+
};
22+
};
23+
};
24+
25+
extraOptions = {
26+
mockDevIcons = lib.mkEnableOption "" // {
27+
description = ''
28+
Whether to tell `mini.icons` to emulate `nvim-web-devicons` for plugins that don't natively support it.
29+
30+
When enabled, you don't need to set `plugins.web-devicons.enable`. This will replace the need for it.
31+
'';
32+
};
33+
};
34+
35+
extraConfig = cfg: {
36+
plugins.mini-icons.luaConfig.content = lib.mkAfter (
37+
lib.optionalString cfg.mockDevIcons ''
38+
MiniIcons.mock_nvim_web_devicons()
39+
''
40+
);
41+
};
42+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
empty = {
3+
plugins.mini-icons.enable = true;
4+
};
5+
6+
example = {
7+
plugins.mini-icons = {
8+
enable = true;
9+
10+
settings = {
11+
style = "glyph";
12+
extension = {
13+
lua = {
14+
hl = "Special";
15+
};
16+
};
17+
file = {
18+
"init.lua" = {
19+
glyph = "";
20+
hl = "MiniIconsGreen";
21+
};
22+
};
23+
};
24+
};
25+
};
26+
}

0 commit comments

Comments
 (0)