mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +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,
|
helpers,
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
options,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
@ -25,6 +26,17 @@ in
|
||||||
(mkRemovedOptionModule (
|
(mkRemovedOptionModule (
|
||||||
basePluginPath ++ [ "closeFloatsOnEscapeKey" ]
|
basePluginPath ++ [ "closeFloatsOnEscapeKey" ]
|
||||||
) "This option has been removed from upstream.")
|
) "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 =
|
options.plugins.neo-tree =
|
||||||
let
|
let
|
||||||
|
@ -62,11 +74,6 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
iconsPackage = lib.mkPackageOption pkgs [
|
|
||||||
"vimPlugins"
|
|
||||||
"nvim-web-devicons"
|
|
||||||
] { nullable = true; };
|
|
||||||
|
|
||||||
gitPackage = lib.mkPackageOption pkgs "git" {
|
gitPackage = lib.mkPackageOption pkgs "git" {
|
||||||
nullable = true;
|
nullable = true;
|
||||||
};
|
};
|
||||||
|
@ -1130,9 +1137,22 @@ in
|
||||||
// cfg.extraOptions;
|
// cfg.extraOptions;
|
||||||
in
|
in
|
||||||
mkIf cfg.enable {
|
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 = [
|
extraPlugins = [
|
||||||
cfg.package
|
cfg.package
|
||||||
] ++ lib.optional (cfg.iconsPackage != null) cfg.iconsPackage;
|
];
|
||||||
|
|
||||||
extraConfigLua = ''
|
extraConfigLua = ''
|
||||||
require('neo-tree').setup(${helpers.toLuaObject setupOptions})
|
require('neo-tree').setup(${helpers.toLuaObject setupOptions})
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
{
|
{
|
||||||
empty = {
|
empty = {
|
||||||
|
plugins.web-devicons.enable = true;
|
||||||
plugins.neo-tree.enable = true;
|
plugins.neo-tree.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
defaults = {
|
defaults = {
|
||||||
|
plugins.web-devicons.enable = true;
|
||||||
plugins.neo-tree = {
|
plugins.neo-tree = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
@ -439,10 +441,17 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
no-packages = {
|
no-packages = {
|
||||||
|
plugins.web-devicons.enable = false;
|
||||||
plugins.neo-tree = {
|
plugins.neo-tree = {
|
||||||
enable = true;
|
enable = true;
|
||||||
iconsPackage = null;
|
|
||||||
gitPackage = 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;
|
enable = true;
|
||||||
neoTreeIntegration = true;
|
neoTreeIntegration = true;
|
||||||
};
|
};
|
||||||
|
plugins.web-devicons.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue