mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
plugins/bufferline: iconsPackage -> icons provider options
This commit is contained in:
parent
2cf80fd66f
commit
59a9652aee
3 changed files with 25 additions and 14 deletions
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
plugins.bufferline = {
|
||||
enable = true;
|
||||
plugins = {
|
||||
bufferline.enable = true;
|
||||
web-devicons.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue