diff --git a/plugins/by-name/bufferline/default.nix b/plugins/by-name/bufferline/default.nix index f66d5365..d19d7c16 100644 --- a/plugins/by-name/bufferline/default.nix +++ b/plugins/by-name/bufferline/default.nix @@ -1,6 +1,7 @@ { lib, - pkgs, + options, + config, ... }: let @@ -161,6 +162,9 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin { (lib.mkRenamedOptionModule (oldHighlightsPath ++ [ "trunkMarker" ]) ( newHighlightsPath ++ [ "trunc_marker" ] )) + (lib.mkRemovedOptionModule (basePluginPath ++ [ "iconsPackage" ]) '' + Please use `plugins.web-devicons` or `plugins.mini.modules.icons` with `plugins.mini.mockDevIcons` instead. + '') ] ++ mkSettingsRenamedOptionModules basePluginPath optionsPath oldOptions ++ mkSettingsRenamedOptionModules oldHighlightsPath newHighlightsPath oldHighlightOptions; @@ -653,16 +657,19 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin { }; }; - extraOptions = { - iconsPackage = lib.mkPackageOption pkgs [ - "vimPlugins" - "nvim-web-devicons" - ] { nullable = true; }; - }; - extraConfig = cfg: { - extraPlugins = lib.mkIf (cfg.iconsPackage != null) [ cfg.iconsPackage ]; - + # TODO: added 2024-09-20 remove after 24.11 + plugins.web-devicons = lib.mkIf ( + !( + config.plugins.mini.enable + && config.plugins.mini.modules ? icons + && config.plugins.mini.mockDevIcons + ) + ) { enable = lib.mkOverride 1490 true; }; + warnings = lib.optional (options.plugins.web-devicons.enable.highestPrio == 1490) '' + Nixvim (plugins.bufferline) `web-devicons` automatic installation is deprecated. + Please use `plugins.web-devicons` or `plugins.mini.modules.icons` with `plugins.mini.mockDevIcons` instead. + ''; opts.termguicolors = true; }; } diff --git a/templates/simple/config/bufferline.nix b/templates/simple/config/bufferline.nix index fe5cf058..2dfee9ee 100644 --- a/templates/simple/config/bufferline.nix +++ b/templates/simple/config/bufferline.nix @@ -1,5 +1,6 @@ { - plugins.bufferline = { - enable = true; + plugins = { + bufferline.enable = true; + web-devicons.enable = true; }; } diff --git a/tests/test-sources/plugins/by-name/bufferline/default.nix b/tests/test-sources/plugins/by-name/bufferline/default.nix index 14b83b4b..2f2a1ad4 100644 --- a/tests/test-sources/plugins/by-name/bufferline/default.nix +++ b/tests/test-sources/plugins/by-name/bufferline/default.nix @@ -1,9 +1,11 @@ { empty = { + plugins.web-devicons.enable = true; plugins.bufferline.enable = true; }; example = { + plugins.web-devicons.enable = true; plugins.bufferline = { enable = true; settings = { @@ -58,6 +60,7 @@ }; defaults = { + plugins.web-devicons.enable = true; plugins.bufferline = { enable = true; settings = { @@ -124,10 +127,10 @@ }; }; - no-packages = { + no-icons = { + plugins.web-devicons.enable = false; plugins.bufferline = { enable = true; - iconsPackage = null; }; }; }