mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
treewide: consolidate iconsPackage removal and warning
This commit is contained in:
parent
38a183564b
commit
b473bdc5ae
12 changed files with 64 additions and 208 deletions
|
@ -14,6 +14,21 @@ let
|
|||
# Added 2024-09-17
|
||||
surround = "vim-surround";
|
||||
};
|
||||
# Added 2024-09-21; remove after 24.11
|
||||
# `iconsPackage` options were briefly available in the following plugins for ~3 weeks
|
||||
iconsPackagePlugins = [
|
||||
"telescope"
|
||||
"lspsaga"
|
||||
"nvim-tree"
|
||||
"neo-tree"
|
||||
"trouble"
|
||||
"alpha"
|
||||
"diffview"
|
||||
"fzf-lua"
|
||||
"bufferline"
|
||||
"barbar"
|
||||
"chadtree"
|
||||
];
|
||||
in
|
||||
{
|
||||
|
||||
|
@ -36,5 +51,36 @@ in
|
|||
"plugins"
|
||||
new
|
||||
]
|
||||
) renamed);
|
||||
) renamed)
|
||||
++ builtins.map (
|
||||
name:
|
||||
lib.mkRemovedOptionModule
|
||||
[
|
||||
"plugins"
|
||||
name
|
||||
"iconsPackage"
|
||||
]
|
||||
''
|
||||
Please use `plugins.web-devicons` or `plugins.mini.modules.icons` with `plugins.mini.mockDevIcons` instead.
|
||||
''
|
||||
) iconsPackagePlugins
|
||||
# Show a warning when web-devicons is auto-enabled
|
||||
++ [
|
||||
(
|
||||
{ config, options, ... }:
|
||||
{
|
||||
config = lib.mkIf (options.plugins.web-devicons.enable.highestPrio == 1490) {
|
||||
warnings = [
|
||||
''
|
||||
Nixvim: `plugins.web-devicons` was enabled automatically because the following plugins are enabled.
|
||||
This behaviour is deprecated. Please explicitly define `plugins.web-devicons.enable` or alternatively enable `plugins.mini.modules.icons` with `plugins.mini.mockDevIcons`.
|
||||
${lib.concatMapStringsSep "\n" (name: "plugins.${name}") (
|
||||
builtins.filter (name: config.plugins.${name}.enable) iconsPackagePlugins
|
||||
)}
|
||||
''
|
||||
];
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue