mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +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,
|
lib,
|
||||||
helpers,
|
helpers,
|
||||||
options,
|
options,
|
||||||
|
@ -37,6 +38,20 @@ helpers.neovim-plugin.mkNeovimPlugin {
|
||||||
|
|
||||||
inherit settingsOptions settingsExample;
|
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 = {
|
extraOptions = {
|
||||||
fzfPackage = lib.mkPackageOption pkgs "fzf" {
|
fzfPackage = lib.mkPackageOption pkgs "fzf" {
|
||||||
nullable = true;
|
nullable = true;
|
||||||
|
@ -50,11 +65,6 @@ helpers.neovim-plugin.mkNeovimPlugin {
|
||||||
visible = false;
|
visible = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
iconsPackage = lib.mkPackageOption pkgs [
|
|
||||||
"vimPlugins"
|
|
||||||
"nvim-web-devicons"
|
|
||||||
] { nullable = true; };
|
|
||||||
|
|
||||||
profile = helpers.defaultNullOpts.mkEnumFirstDefault [
|
profile = helpers.defaultNullOpts.mkEnumFirstDefault [
|
||||||
"default"
|
"default"
|
||||||
"fzf-native"
|
"fzf-native"
|
||||||
|
@ -112,17 +122,38 @@ helpers.neovim-plugin.mkNeovimPlugin {
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# TODO: deprecated 2024-08-29 remove after 24.11
|
# TODO: deprecated 2024-08-29 remove after 24.11
|
||||||
warnings = lib.mkIf opt.iconsEnabled.isDefined [
|
warnings = lib.optionals opt.iconsEnabled.isDefined (
|
||||||
|
[
|
||||||
''
|
''
|
||||||
nixvim (plugins.fzf-lua):
|
The option definition `plugins.fzf-lua.iconsEnabled' in ${lib.showFiles opt.iconsEnabled.files} has been deprecated; please remove it.
|
||||||
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 (
|
lib.optional
|
||||||
cfg.iconsPackage != null && (opt.iconsEnabled.isDefined -> cfg.iconsEnabled)
|
(
|
||||||
) [ cfg.iconsPackage ];
|
(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 ];
|
extraPackages = [ cfg.fzfPackage ];
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
{
|
{
|
||||||
empty = {
|
empty = {
|
||||||
|
plugins.web-devicons.enable = true;
|
||||||
plugins.fzf-lua.enable = true;
|
plugins.fzf-lua.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
example = {
|
example = {
|
||||||
|
plugins.web-devicons.enable = true;
|
||||||
plugins.fzf-lua = {
|
plugins.fzf-lua = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
@ -55,10 +57,10 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
no-packages = {
|
no-icons = {
|
||||||
|
plugins.web-devicons.enable = true;
|
||||||
plugins.fzf-lua = {
|
plugins.fzf-lua = {
|
||||||
enable = true;
|
enable = true;
|
||||||
iconsPackage = null;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
{
|
||||||
empty = {
|
empty = {
|
||||||
# This test is flaky and fails non-deterministically
|
# This test is flaky and fails non-deterministically
|
||||||
|
@ -31,10 +30,13 @@
|
||||||
# This test is flaky and fails non-deterministically
|
# This test is flaky and fails non-deterministically
|
||||||
test.runNvim = false;
|
test.runNvim = false;
|
||||||
|
|
||||||
plugins.octo = {
|
plugins = {
|
||||||
|
octo = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.picker = "fzf-lua";
|
settings.picker = "fzf-lua";
|
||||||
};
|
};
|
||||||
|
web-devicons.enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
defaults = {
|
defaults = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue