mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
plugins/barbar: iconsPackage -> icons provider options
This commit is contained in:
parent
23a903f13c
commit
2cf80fd66f
3 changed files with 32 additions and 9 deletions
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
options,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
@ -172,6 +173,17 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
# TODO: added 2024-09-20 remove after 24.11
|
||||||
|
(lib.mkRemovedOptionModule
|
||||||
|
[
|
||||||
|
"plugins"
|
||||||
|
"barbar"
|
||||||
|
"iconsPackage"
|
||||||
|
]
|
||||||
|
''
|
||||||
|
Please use `plugins.web-devicons` or `plugins.mini.modules.icons` with `plugins.mini.mockDevIcons` instead.
|
||||||
|
''
|
||||||
|
)
|
||||||
]
|
]
|
||||||
++ (map
|
++ (map
|
||||||
(
|
(
|
||||||
|
@ -195,11 +207,6 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
|
||||||
);
|
);
|
||||||
|
|
||||||
extraOptions = {
|
extraOptions = {
|
||||||
iconsPackage = lib.mkPackageOption pkgs [
|
|
||||||
"vimPlugins"
|
|
||||||
"nvim-web-devicons"
|
|
||||||
] { nullable = true; };
|
|
||||||
|
|
||||||
keymaps = mapAttrs (
|
keymaps = mapAttrs (
|
||||||
optionName: funcName:
|
optionName: funcName:
|
||||||
mkNullOrOption' {
|
mkNullOrOption' {
|
||||||
|
@ -217,7 +224,18 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = cfg: {
|
extraConfig = cfg: {
|
||||||
extraPlugins = mkIf (cfg.iconsPackage != null) [ cfg.iconsPackage ];
|
# TODO: added 2024-09-20 remove after 24.11
|
||||||
|
plugins.web-devicons = mkIf (
|
||||||
|
!(
|
||||||
|
config.plugins.mini.enable
|
||||||
|
&& config.plugins.mini.modules ? icons
|
||||||
|
&& config.plugins.mini.mockDevIcons
|
||||||
|
)
|
||||||
|
) { enable = mkOverride 1490 true; };
|
||||||
|
warnings = optional (options.plugins.web-devicons.enable.highestPrio == 1490) ''
|
||||||
|
Nixvim (plugins.barbar) `web-devicons` automatic installation is deprecated.
|
||||||
|
Please use `plugins.web-devicons` or `plugins.mini.modules.icons` with `plugins.mini.mockDevIcons` instead.
|
||||||
|
'';
|
||||||
|
|
||||||
keymaps = filter (keymap: keymap != null) (
|
keymaps = filter (keymap: keymap != null) (
|
||||||
# TODO: switch to `attrValues cfg.keymaps` when removing the deprecation warnings above:
|
# TODO: switch to `attrValues cfg.keymaps` when removing the deprecation warnings above:
|
||||||
|
|
|
@ -139,6 +139,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
barbar.enable = true;
|
barbar.enable = true;
|
||||||
|
web-devicons.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
globals.mapleader = " ";
|
globals.mapleader = " ";
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
{
|
{
|
||||||
empty = {
|
empty = {
|
||||||
|
plugins.web-devicons.enable = true;
|
||||||
plugins.barbar.enable = true;
|
plugins.barbar.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
keymappings = {
|
keymappings = {
|
||||||
|
plugins.web-devicons.enable = true;
|
||||||
plugins.barbar = {
|
plugins.barbar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
@ -20,6 +22,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
defaults = {
|
defaults = {
|
||||||
|
plugins.web-devicons.enable = true;
|
||||||
plugins.barbar = {
|
plugins.barbar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
@ -113,6 +116,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
readme-example = {
|
readme-example = {
|
||||||
|
plugins.web-devicons.enable = true;
|
||||||
plugins.barbar = {
|
plugins.barbar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
@ -220,10 +224,10 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
no-packages = {
|
no-icons = {
|
||||||
|
plugins.web-devicons.enable = false;
|
||||||
plugins.barbar = {
|
plugins.barbar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
iconsPackage = null;
|
|
||||||
settings.icons.filetype.enabled = false;
|
settings.icons.filetype.enabled = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue