mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
plugins/lspsaga: iconsPackage -> icons provider options
This commit is contained in:
parent
254b15d066
commit
5ff98645ce
2 changed files with 49 additions and 19 deletions
|
@ -3,6 +3,7 @@
|
||||||
helpers,
|
helpers,
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
options,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
@ -43,6 +44,19 @@ in
|
||||||
"keys"
|
"keys"
|
||||||
"borderStyle"
|
"borderStyle"
|
||||||
"renamePromptPrefix"
|
"renamePromptPrefix"
|
||||||
|
]
|
||||||
|
++ [
|
||||||
|
# TODO: added 2024-09-20 remove after 24.11
|
||||||
|
(lib.mkRemovedOptionModule
|
||||||
|
[
|
||||||
|
"plugins"
|
||||||
|
"lspsaga"
|
||||||
|
"iconsPackage"
|
||||||
|
]
|
||||||
|
''
|
||||||
|
Please use `plugins.web-devicons` or `plugins.mini.modules.icons` with `plugins.mini.mockDevIcons` instead.
|
||||||
|
''
|
||||||
|
)
|
||||||
];
|
];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
@ -56,11 +70,6 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
iconsPackage = lib.mkPackageOption pkgs [
|
|
||||||
"vimPlugins"
|
|
||||||
"nvim-web-devicons"
|
|
||||||
] { nullable = true; };
|
|
||||||
|
|
||||||
ui = {
|
ui = {
|
||||||
border = helpers.defaultNullOpts.mkBorder "single" "lspsaga" "";
|
border = helpers.defaultNullOpts.mkBorder "single" "lspsaga" "";
|
||||||
|
|
||||||
|
@ -461,18 +470,37 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
extraPlugins =
|
# TODO: added 2024-09-20 remove after 24.11
|
||||||
[ cfg.package ]
|
plugins.web-devicons =
|
||||||
++ optional (
|
lib.mkIf
|
||||||
cfg.iconsPackage != null && (cfg.ui.devicon == null || cfg.ui.devicon)
|
(
|
||||||
) cfg.iconsPackage;
|
(cfg.ui.devicon == null || cfg.ui.devicon)
|
||||||
|
&& !(
|
||||||
warnings = mkIf (
|
config.plugins.mini.enable
|
||||||
|
&& config.plugins.mini.modules ? icons
|
||||||
|
&& config.plugins.mini.mockDevIcons
|
||||||
|
)
|
||||||
|
)
|
||||||
|
{
|
||||||
|
enable = mkOverride 1490 true;
|
||||||
|
};
|
||||||
|
warnings =
|
||||||
|
lib.optional
|
||||||
|
(
|
||||||
|
(cfg.ui.devicon == null || cfg.ui.devicon)
|
||||||
|
&& options.plugins.web-devicons.enable.highestPrio == 1490
|
||||||
|
)
|
||||||
|
''
|
||||||
|
Nixvim (plugins.lspsaga) `web-devicons` automatic installation is deprecated.
|
||||||
|
Please use `plugins.web-devicons` or `plugins.mini.modules.icons` with `plugins.mini.mockDevIcons` instead.
|
||||||
|
''
|
||||||
|
++ lib.optional (
|
||||||
# https://nvimdev.github.io/lspsaga/implement/#default-options
|
# https://nvimdev.github.io/lspsaga/implement/#default-options
|
||||||
(isBool cfg.implement.enable && cfg.implement.enable)
|
(isBool cfg.implement.enable && cfg.implement.enable)
|
||||||
&& (isBool cfg.symbolInWinbar.enable && !cfg.symbolInWinbar.enable)
|
&& (isBool cfg.symbolInWinbar.enable && !cfg.symbolInWinbar.enable)
|
||||||
) [ "You have enabled the `implement` module but it requires `symbolInWinbar` to be enabled." ];
|
) "You have enabled the `implement` module but it requires `symbolInWinbar` to be enabled.";
|
||||||
|
|
||||||
|
extraPlugins = [ cfg.package ];
|
||||||
extraConfigLua =
|
extraConfigLua =
|
||||||
let
|
let
|
||||||
setupOptions =
|
setupOptions =
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
{
|
{
|
||||||
empty = {
|
empty = {
|
||||||
|
plugins.web-devicons.enable = true;
|
||||||
plugins.lspsaga.enable = true;
|
plugins.lspsaga.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
defaults = {
|
defaults = {
|
||||||
|
plugins.web-devicons.enable = true;
|
||||||
plugins.lspsaga = {
|
plugins.lspsaga = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
@ -171,10 +173,10 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
no-packages = {
|
no-icons = {
|
||||||
|
plugins.web-devicons.enable = false;
|
||||||
plugins.lspsaga = {
|
plugins.lspsaga = {
|
||||||
enable = true;
|
enable = true;
|
||||||
iconsPackage = null;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue