mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
plugins/fzf-lua: iconsPackage -> icons provider options
This commit is contained in:
parent
59a9652aee
commit
cf13d60cd6
3 changed files with 57 additions and 22 deletions
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
helpers,
|
||||
options,
|
||||
|
@ -37,6 +38,20 @@ helpers.neovim-plugin.mkNeovimPlugin {
|
|||
|
||||
inherit settingsOptions settingsExample;
|
||||
|
||||
# TODO: added 2024-09-20 remove after 24.11
|
||||
imports = [
|
||||
(lib.mkRemovedOptionModule
|
||||
[
|
||||
"plugins"
|
||||
"fzf-lua"
|
||||
"iconsPackage"
|
||||
]
|
||||
''
|
||||
Please use `plugins.web-devicons` or `plugins.mini.modules.icons` with `plugins.mini.mockDevIcons` instead.
|
||||
''
|
||||
)
|
||||
];
|
||||
|
||||
extraOptions = {
|
||||
fzfPackage = lib.mkPackageOption pkgs "fzf" {
|
||||
nullable = true;
|
||||
|
@ -50,11 +65,6 @@ helpers.neovim-plugin.mkNeovimPlugin {
|
|||
visible = false;
|
||||
};
|
||||
|
||||
iconsPackage = lib.mkPackageOption pkgs [
|
||||
"vimPlugins"
|
||||
"nvim-web-devicons"
|
||||
] { nullable = true; };
|
||||
|
||||
profile = helpers.defaultNullOpts.mkEnumFirstDefault [
|
||||
"default"
|
||||
"fzf-native"
|
||||
|
@ -112,17 +122,38 @@ helpers.neovim-plugin.mkNeovimPlugin {
|
|||
in
|
||||
{
|
||||
# TODO: deprecated 2024-08-29 remove after 24.11
|
||||
warnings = lib.mkIf opt.iconsEnabled.isDefined [
|
||||
''
|
||||
nixvim (plugins.fzf-lua):
|
||||
The option definition `plugins.fzf-lua.iconsEnabled' in ${showFiles opt.iconsEnabled.files} has been deprecated; please remove it.
|
||||
You should use `plugins.fzf-lua.iconsPackage' instead.
|
||||
''
|
||||
];
|
||||
|
||||
extraPlugins = lib.mkIf (
|
||||
cfg.iconsPackage != null && (opt.iconsEnabled.isDefined -> cfg.iconsEnabled)
|
||||
) [ cfg.iconsPackage ];
|
||||
warnings = lib.optionals opt.iconsEnabled.isDefined (
|
||||
[
|
||||
''
|
||||
The option definition `plugins.fzf-lua.iconsEnabled' in ${lib.showFiles opt.iconsEnabled.files} has been deprecated; please remove it.
|
||||
''
|
||||
]
|
||||
++
|
||||
lib.optional
|
||||
(
|
||||
(opt.iconsEnabled.isDefined -> cfg.iconsEnabled)
|
||||
&& options.plugins.web-devicons.enable.highestPrio == 1490
|
||||
)
|
||||
''
|
||||
Nixvim (plugins.fzf-lua) `web-devicons` automatic installation is deprecated.
|
||||
Please use `plugins.web-devicons` or `plugins.mini.modules.icons` with `plugins.mini.mockDevIcons` instead.
|
||||
''
|
||||
);
|
||||
# TODO: added 2024-09-20 remove after 24.11
|
||||
plugins.web-devicons =
|
||||
lib.mkIf
|
||||
(
|
||||
opt.iconsEnabled.isDefined
|
||||
&& cfg.iconsEnabled
|
||||
&& !(
|
||||
config.plugins.mini.enable
|
||||
&& config.plugins.mini.modules ? icons
|
||||
&& config.plugins.mini.mockDevIcons
|
||||
)
|
||||
)
|
||||
{
|
||||
enable = lib.mkOverride 1490 true;
|
||||
};
|
||||
|
||||
extraPackages = [ cfg.fzfPackage ];
|
||||
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
{
|
||||
empty = {
|
||||
plugins.web-devicons.enable = true;
|
||||
plugins.fzf-lua.enable = true;
|
||||
};
|
||||
|
||||
example = {
|
||||
plugins.web-devicons.enable = true;
|
||||
plugins.fzf-lua = {
|
||||
enable = true;
|
||||
|
||||
|
@ -55,10 +57,10 @@
|
|||
};
|
||||
};
|
||||
|
||||
no-packages = {
|
||||
no-icons = {
|
||||
plugins.web-devicons.enable = true;
|
||||
plugins.fzf-lua = {
|
||||
enable = true;
|
||||
iconsPackage = null;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
empty = {
|
||||
# This test is flaky and fails non-deterministically
|
||||
|
@ -31,9 +30,12 @@
|
|||
# This test is flaky and fails non-deterministically
|
||||
test.runNvim = false;
|
||||
|
||||
plugins.octo = {
|
||||
enable = true;
|
||||
settings.picker = "fzf-lua";
|
||||
plugins = {
|
||||
octo = {
|
||||
enable = true;
|
||||
settings.picker = "fzf-lua";
|
||||
};
|
||||
web-devicons.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue