mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
plugins/neo-tree: iconsPackage -> icons provider options
This commit is contained in:
parent
2e281c43e0
commit
e23bd5475c
3 changed files with 37 additions and 7 deletions
|
@ -3,6 +3,7 @@
|
|||
helpers,
|
||||
config,
|
||||
pkgs,
|
||||
options,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
|
@ -25,6 +26,17 @@ in
|
|||
(mkRemovedOptionModule (
|
||||
basePluginPath ++ [ "closeFloatsOnEscapeKey" ]
|
||||
) "This option has been removed from upstream.")
|
||||
# TODO: added 2024-09-20 remove after 24.11
|
||||
(lib.mkRemovedOptionModule
|
||||
[
|
||||
"plugins"
|
||||
"neo-tree"
|
||||
"iconsPackage"
|
||||
]
|
||||
''
|
||||
Please use `plugins.web-devicons` or `plugins.mini.modules.icons` with `plugins.mini.mockDevIcons` instead.
|
||||
''
|
||||
)
|
||||
];
|
||||
options.plugins.neo-tree =
|
||||
let
|
||||
|
@ -62,11 +74,6 @@ in
|
|||
];
|
||||
};
|
||||
|
||||
iconsPackage = lib.mkPackageOption pkgs [
|
||||
"vimPlugins"
|
||||
"nvim-web-devicons"
|
||||
] { nullable = true; };
|
||||
|
||||
gitPackage = lib.mkPackageOption pkgs "git" {
|
||||
nullable = true;
|
||||
};
|
||||
|
@ -1130,9 +1137,22 @@ in
|
|||
// cfg.extraOptions;
|
||||
in
|
||||
mkIf cfg.enable {
|
||||
# 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.neo-tree) `web-devicons` automatic installation is deprecated.
|
||||
Please use `plugins.web-devicons` or `plugins.mini.modules.icons` with `plugins.mini.mockDevIcons` instead.
|
||||
'';
|
||||
|
||||
extraPlugins = [
|
||||
cfg.package
|
||||
] ++ lib.optional (cfg.iconsPackage != null) cfg.iconsPackage;
|
||||
];
|
||||
|
||||
extraConfigLua = ''
|
||||
require('neo-tree').setup(${helpers.toLuaObject setupOptions})
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
{
|
||||
empty = {
|
||||
plugins.web-devicons.enable = true;
|
||||
plugins.neo-tree.enable = true;
|
||||
};
|
||||
|
||||
defaults = {
|
||||
plugins.web-devicons.enable = true;
|
||||
plugins.neo-tree = {
|
||||
enable = true;
|
||||
|
||||
|
@ -439,10 +441,17 @@
|
|||
};
|
||||
|
||||
no-packages = {
|
||||
plugins.web-devicons.enable = false;
|
||||
plugins.neo-tree = {
|
||||
enable = true;
|
||||
iconsPackage = null;
|
||||
gitPackage = null;
|
||||
};
|
||||
};
|
||||
|
||||
no-icons = {
|
||||
plugins = {
|
||||
web-devicons.enable = false;
|
||||
neo-tree.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -12,5 +12,6 @@ pkgs.lib.optionalAttrs (!pkgs.stdenv.isDarwin) {
|
|||
enable = true;
|
||||
neoTreeIntegration = true;
|
||||
};
|
||||
plugins.web-devicons.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue