plugins/*: use new mkSettingsRenamedOptionModules

This commit is contained in:
Gaetan Lepage 2024-12-16 10:38:12 +01:00 committed by nix-infra-bot
parent 0ddf6e39ac
commit c179d47d3d
37 changed files with 1176 additions and 1510 deletions

View file

@ -89,22 +89,27 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
"colorOverrides"
"customHighlights"
"integrations"
{
old = "showBufferEnd";
new = "show_end_of_buffer";
}
{
old = "terminalColors";
new = "term_colors";
}
{
old = "disableItalic";
new = "no_italic";
}
{
old = "disableBold";
new = "no_bold";
}
{
old = "disableUnderline";
new = "no_underline";
}
];
imports =
lib.mapAttrsToList
(
old: new:
lib.mkRenamedOptionModule
[ "colorschemes" "catppuccin" old ]
[ "colorschemes" "catppuccin" "settings" new ]
)
{
showBufferEnd = "show_end_of_buffer";
terminalColors = "term_colors";
disableItalic = "no_italic";
disableBold = "no_bold";
disableUnderline = "no_underline";
};
settingsOptions =
let

View file

@ -22,60 +22,53 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
# TODO introduced 2024-03-15: remove 2024-05-15
deprecateExtraOptions = true;
imports =
let
basePluginPath = [
optionsRenamedToSettings = [
"compile"
"undercurl"
"commentStyle"
"functionStyle"
"keywordStyle"
"statementStyle"
"typeStyle"
"transparent"
"dimInactive"
"terminalColors"
[
"colors"
"palette"
]
[
"colors"
"theme"
]
"theme"
[
"background"
"dark"
]
[
"background"
"light"
]
];
imports = [
(lib.mkRemovedOptionModule
[
"colorschemes"
"kanagawa"
];
in
(map
(
optionPath:
lib.mkRenamedOptionModule (basePluginPath ++ optionPath) (
basePluginPath ++ [ "settings" ] ++ optionPath
)
)
[
[ "compile" ]
[ "undercurl" ]
[ "commentStyle" ]
[ "functionStyle" ]
[ "keywordStyle" ]
[ "statementStyle" ]
[ "typeStyle" ]
[ "transparent" ]
[ "dimInactive" ]
[ "terminalColors" ]
[
"colors"
"palette"
]
[
"colors"
"theme"
]
[ "theme" ]
[
"background"
"dark"
]
[
"background"
"light"
]
"overrides"
]
)
++ [
(lib.mkRemovedOptionModule (basePluginPath ++ [ "overrides" ]) ''
''
Use `colorschemes.kanagawa.settings.overrides` but you now have to add the full function definition:
```
function(colors)
...
end
```
'')
];
''
)
];
settingsOptions = {
compile = defaultNullOpts.mkBool false ''

View file

@ -15,6 +15,21 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
optionsRenamedToSettings = [
"groups"
"highlightGroups"
{
old = "style";
new = "dark_variant";
}
{
old = "dimInactive";
new = "dim_inactive_windows";
}
{
old = "transparentBackground";
new = [
"enable"
"transparency"
];
}
];
imports =
let
@ -24,20 +39,6 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
];
in
[
(lib.mkRenamedOptionModule (basePluginPath ++ [ "style" ]) (
basePluginPath
++ [
"settings"
"dark_variant"
]
))
(lib.mkRenamedOptionModule (basePluginPath ++ [ "dimInactive" ]) (
basePluginPath
++ [
"settings"
"dim_inactive_windows"
]
))
(lib.mkRemovedOptionModule (
basePluginPath ++ [ "disableItalics" ]
) "Use `colorschemes.rose-pine.settings.enable.italics` instead.")
@ -47,14 +48,6 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
(lib.mkRemovedOptionModule (
basePluginPath ++ [ "transparentFloat" ]
) "Use `colorschemes.rose-pine.settings.highlight_groups.NormalFloat` instead.")
(lib.mkRenamedOptionModule (basePluginPath ++ [ "transparentBackground" ]) (
basePluginPath
++ [
"settings"
"enable"
"transparency"
]
))
];
settingsOptions = {