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

@ -28,19 +28,14 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
"triggerEvents" "triggerEvents"
"writeAllBuffers" "writeAllBuffers"
"debounceDelay" "debounceDelay"
{
old = "enableAutoSave";
new = "enabled";
}
]; ];
imports = imports = [
let (lib.mkRemovedOptionModule [ "plugins" "auto-save" "keymaps" ] ''
basePluginPath = [
"plugins"
"auto-save"
];
settingsPath = basePluginPath ++ [ "settings" ];
in
[
(lib.mkRenamedOptionModule (basePluginPath ++ [ "enableAutoSave" ]) (settingsPath ++ [ "enabled" ]))
(lib.mkRemovedOptionModule (basePluginPath ++ [ "keymaps" ]) ''
Use the top-level `keymaps` option to create a keymap that runs :ASToggle Use the top-level `keymaps` option to create a keymap that runs :ASToggle
keymaps = [ keymaps = [

View file

@ -14,79 +14,9 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
# TODO: added 204-10-05 remove after 24.11 # TODO: added 204-10-05 remove after 24.11
deprecateExtraOptions = true; deprecateExtraOptions = true;
optionsRenamedToSettings = [ optionsRenamedToSettings = import ./renamed-options.nix;
"logLevel" imports = [
[ (lib.mkRemovedOptionModule [ "plugins" "auto-session" "cwdChangeHandling" ] ''
"sessionLens"
"loadOnSetup"
]
[
"sessionLens"
"themeConf"
]
[
"sessionLens"
"previewer"
]
[
"sessionControl"
"controlDir"
]
[
"sessionControl"
"controlFilename"
]
];
# NOTE: rename the old settings to use the correct variables
imports =
let
basePluginPath = [
"plugins"
"auto-session"
];
settingsPath = basePluginPath ++ [ "settings" ];
nestedAutoSessionPluginPath = basePluginPath ++ [ "autoSession" ];
in
[
(lib.mkRenamedOptionModule (
basePluginPath
++ [
"autoSave"
"enabled"
]
) (settingsPath ++ [ "auto_save" ]))
(lib.mkRenamedOptionModule (
basePluginPath
++ [
"autoRestore"
"enabled"
]
) (settingsPath ++ [ "auto_restore" ]))
(lib.mkRenamedOptionModule (basePluginPath ++ [ "bypassSessionSaveFileTypes" ]) (
settingsPath ++ [ "bypass_save_filetypes" ]
))
(lib.mkRenamedOptionModule (nestedAutoSessionPluginPath ++ [ "enableLastSession" ]) (
settingsPath ++ [ "auto_restore_last_session" ]
))
(lib.mkRenamedOptionModule (nestedAutoSessionPluginPath ++ [ "rootDir" ]) (
settingsPath ++ [ "root_dir" ]
))
(lib.mkRenamedOptionModule (nestedAutoSessionPluginPath ++ [ "enabled" ]) (
settingsPath ++ [ "enabled" ]
))
(lib.mkRenamedOptionModule (nestedAutoSessionPluginPath ++ [ "createEnabled" ]) (
settingsPath ++ [ "auto_create" ]
))
(lib.mkRenamedOptionModule (nestedAutoSessionPluginPath ++ [ "suppressDirs" ]) (
settingsPath ++ [ "suppressed_dirs" ]
))
(lib.mkRenamedOptionModule (nestedAutoSessionPluginPath ++ [ "allowedDirs" ]) (
settingsPath ++ [ "allowed_dirs" ]
))
(lib.mkRenamedOptionModule (nestedAutoSessionPluginPath ++ [ "useGitBranch" ]) (
settingsPath ++ [ "use_git_branch" ]
))
(lib.mkRemovedOptionModule (basePluginPath ++ [ "cwdChangeHandling" ]) ''
Please switch to `cwd_change_handling` with just a boolean value. Please switch to `cwd_change_handling` with just a boolean value.
'') '')
]; ];

View file

@ -0,0 +1,90 @@
[
"logLevel"
[
"sessionLens"
"loadOnSetup"
]
[
"sessionLens"
"themeConf"
]
[
"sessionLens"
"previewer"
]
[
"sessionControl"
"controlDir"
]
[
"sessionControl"
"controlFilename"
]
{
old = [
"autoSave"
"enabled"
];
new = "auto_save";
}
{
old = [
"autoRestore"
"enabled"
];
new = "auto_auto_restore";
}
{
old = "bypassSessionSaveFileTypes";
new = "bypass_save_filetypes";
}
{
old = [
"autoSession"
"enableLastSession"
];
new = "auto_restore_last_session";
}
{
old = [
"autoSession"
"rootDir"
];
new = "root_dir";
}
{
old = [
"autoSession"
"enabled"
];
new = "enabled";
}
{
old = [
"autoSession"
"createEnabled"
];
new = "auto_create";
}
{
old = [
"autoSession"
"suppressDirs"
];
new = "suppressed_dirs";
}
{
old = [
"autoSession"
"allowedDirs"
];
new = "allowed_dirs";
}
{
old = [
"autoSession"
"useGitBranch"
];
new = "use_git_branch";
}
]

View file

@ -125,6 +125,26 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
"sidebarFiletypes" "sidebarFiletypes"
"noNameTitle" "noNameTitle"
"tabpages" "tabpages"
{
old = "excludeFileTypes";
new = "exclude_ft";
}
{
old = "excludeFileNames";
new = "exclude_name";
}
{
old = [
"icons"
"filetype"
"enable"
];
new = [
"icons"
"filetype"
"enabled"
];
}
]; ];
imports = imports =
let let
@ -132,7 +152,6 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
"plugins" "plugins"
"barbar" "barbar"
]; ];
settingsPath = basePluginPath ++ [ "settings" ];
in in
[ [
(mkRemovedOptionModule ( (mkRemovedOptionModule (
@ -142,12 +161,6 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
"silent" "silent"
] ]
) "Keymaps will be silent anyways. This option has always been useless.") ) "Keymaps will be silent anyways. This option has always been useless.")
(mkRenamedOptionModule (basePluginPath ++ [ "excludeFileTypes" ]) (
settingsPath ++ [ "exclude_ft" ]
))
(mkRenamedOptionModule (basePluginPath ++ [ "excludeFileNames" ]) (
settingsPath ++ [ "exclude_name" ]
))
(mkRemovedOptionModule ( (mkRemovedOptionModule (
basePluginPath basePluginPath
++ [ ++ [
@ -155,26 +168,9 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
"diagnostics" "diagnostics"
] ]
) "Use `settings.icons.diagnostics` instead, but pay attention as the keys have changed.") ) "Use `settings.icons.diagnostics` instead, but pay attention as the keys have changed.")
(mkRenamedOptionModule
(
basePluginPath
++ [
"icons"
"filetype"
"enable"
] ]
) ++
( map
settingsPath
++ [
"icons"
"filetype"
"enabled"
]
)
)
]
++ (map
( (
name: name:
mkRemovedOptionModule ( mkRemovedOptionModule (
@ -192,8 +188,7 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
"modified" "modified"
"pinned" "pinned"
"visible" "visible"
] ];
);
extraOptions = { extraOptions = {
keymaps = mapAttrs ( keymaps = mapAttrs (

View file

@ -82,6 +82,13 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
"logging" "logging"
] ]
"customFilter" "customFilter"
{
old = "diagnosticsUpdateInInsert";
new = [
"diagnostics"
"update_in_insert"
];
}
]; ];
oldHighlightOptions = [ oldHighlightOptions = [
@ -142,6 +149,10 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
"pickVisible" "pickVisible"
"pickSelected" "pickSelected"
"offsetSeparator" "offsetSeparator"
{
old = "trunkMarker";
new = "trunc_marker";
}
]; ];
basePluginPath = [ basePluginPath = [
@ -155,13 +166,6 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
in in
[ [
(lib.mkRenamedOptionModule (basePluginPath ++ [ "extraOptions" ]) optionsPath) (lib.mkRenamedOptionModule (basePluginPath ++ [ "extraOptions" ]) optionsPath)
(lib.mkRenamedOptionModule (basePluginPath ++ [ "diagnosticsUpdateInInsert" ]) [
"diagnostics"
"update_in_insert"
])
(lib.mkRenamedOptionModule (oldHighlightsPath ++ [ "trunkMarker" ]) (
newHighlightsPath ++ [ "trunc_marker" ]
))
] ]
++ mkSettingsRenamedOptionModules basePluginPath optionsPath oldOptions ++ mkSettingsRenamedOptionModules basePluginPath optionsPath oldOptions
++ mkSettingsRenamedOptionModules oldHighlightsPath newHighlightsPath oldHighlightOptions; ++ mkSettingsRenamedOptionModules oldHighlightsPath newHighlightsPath oldHighlightOptions;

View file

@ -25,7 +25,24 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
"colorizer" "colorizer"
]; ];
optionsToRename = [ # {
# old = ["userDefaultOptions" "RGB"]; }
# new = ["settings" "user_default_options" "RGB"];
# }
userOptsRenames =
map
(name: {
old = [
"userDefaultOptions"
name
];
new = [
"settings"
"user_default_options"
name
];
})
[
"RGB" "RGB"
"RRGGBB" "RRGGBB"
"names" "names"
@ -41,44 +58,28 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
"always_update" "always_update"
]; ];
renameOption =
optionName:
lib.mkRenamedOptionModule
(
oldPluginPath
++ [
"userDefaultOptions"
optionName
]
)
(
newPluginPath
++ [
"settings"
"user_default_options"
optionName
]
);
in in
map renameOption optionsToRename lib.nixvim.mkSettingsRenamedOptionModules oldPluginPath newPluginPath (
++ [
lib.mapAttrsToList "enable"
( "package"
oldOptionName: newPath:
lib.mkRenamedOptionModule (oldPluginPath ++ [ oldOptionName ]) (newPluginPath ++ newPath)
)
{ {
enable = [ "enable" ]; old = "fileTypes";
package = [ "package" ]; new = [
fileTypes = [
"settings" "settings"
"filetypes" "filetypes"
]; ];
bufTypes = [ }
{
old = "bufTypes";
new = [
"settings" "settings"
"bufTypes" "buftypes"
]; ];
}; }
]
++ userOptsRenames
);
settingsOptions = settingsOptions =
let let

View file

@ -24,109 +24,12 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
"comment" "comment"
]; ];
settingsPath = newPluginPath ++ [ "settings" ]; settingsPath = newPluginPath ++ [ "settings" ];
optionsRenamedToSettings = import ./renamed-options.nix;
in in
[ [
(mkRenamedOptionModule (oldPluginPath ++ [ "enable" ]) (newPluginPath ++ [ "enable" ])) (mkRenamedOptionModule (oldPluginPath ++ [ "enable" ]) (newPluginPath ++ [ "enable" ]))
(mkRenamedOptionModule (oldPluginPath ++ [ "package" ]) (newPluginPath ++ [ "package" ])) (mkRenamedOptionModule (oldPluginPath ++ [ "package" ]) (newPluginPath ++ [ "package" ]))
(mkRenamedOptionModule (oldPluginPath ++ [ "padding" ]) (settingsPath ++ [ "padding" ]))
(mkRenamedOptionModule (oldPluginPath ++ [ "sticky" ]) (settingsPath ++ [ "sticky" ]))
(mkRenamedOptionModule (oldPluginPath ++ [ "ignore" ]) (settingsPath ++ [ "ignore" ]))
(mkRenamedOptionModule
(
oldPluginPath
++ [
"toggler"
"line"
]
)
(
settingsPath
++ [
"toggler"
"line"
]
)
)
(mkRenamedOptionModule
(
oldPluginPath
++ [
"toggler"
"block"
]
)
(
settingsPath
++ [
"toggler"
"block"
]
)
)
(mkRenamedOptionModule
(
oldPluginPath
++ [
"opleader"
"line"
]
)
(
settingsPath
++ [
"opleader"
"line"
]
)
)
(mkRenamedOptionModule
(
oldPluginPath
++ [
"opleader"
"block"
]
)
(
settingsPath
++ [
"opleader"
"block"
]
)
)
(mkRenamedOptionModule
(
oldPluginPath
++ [
"mappings"
"basic"
]
)
(
settingsPath
++ [
"mappings"
"basic"
]
)
)
(mkRenamedOptionModule
(
oldPluginPath
++ [
"mappings"
"extra"
]
)
(
settingsPath
++ [
"mappings"
"extra"
]
)
)
(mkRemovedOptionModule ( (mkRemovedOptionModule (
oldPluginPath oldPluginPath
++ [ ++ [
@ -134,9 +37,8 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
"extended" "extended"
] ]
) "This option has been removed upstream.") ) "This option has been removed upstream.")
(mkRenamedOptionModule (oldPluginPath ++ [ "preHook" ]) (settingsPath ++ [ "pre_hook" ])) ]
(mkRenamedOptionModule (oldPluginPath ++ [ "postHook" ]) (settingsPath ++ [ "post_hook" ])) ++ (lib.nixvim.mkSettingsRenamedOptionModules oldPluginPath settingsPath optionsRenamedToSettings);
];
settingsOptions = { settingsOptions = {
padding = helpers.defaultNullOpts.mkBool true '' padding = helpers.defaultNullOpts.mkBool true ''

View file

@ -0,0 +1,31 @@
[
"padding"
"sticky"
"ignore"
[
"toggler"
"line"
]
[
"toggler"
"block"
]
[
"opleader"
"line"
]
[
"opleader"
"block"
]
[
"mappings"
"basic"
]
[
"mappings"
"extra"
]
"preHook"
"postHook"
]

View file

@ -33,31 +33,20 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
optionsRenamedToSettings = [ optionsRenamedToSettings = [
"xdg" "xdg"
"autoStart" "autoStart"
]; {
imports = old = "recommendedKeymaps";
let new = [
basePath = [
"plugins"
"coq-nvim"
];
settingsPath = basePath ++ [ "settings" ];
in
[
(lib.mkRenamedOptionModule (basePath ++ [ "recommendedKeymaps" ]) (
settingsPath
++ [
"keymap" "keymap"
"recommended" "recommended"
] ];
)) }
{
(lib.mkRenamedOptionModule (basePath ++ [ "alwaysComplete" ]) ( old = "alwaysComplete";
settingsPath new = [
++ [
"completion" "completion"
"always" "always"
] ];
)) }
]; ];
callSetup = false; callSetup = false;

View file

@ -12,73 +12,84 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
maintainers = [ maintainers.MattSturgeon ]; maintainers = [ maintainers.MattSturgeon ];
# TODO introduced 2024-05-30: remove 2024-09-01 # TODO introduced 2024-05-30: remove 2024-09-01
imports = optionsRenamedToSettings = [
let
basePluginPath = [
"plugins"
"dashboard"
];
in
[
(mkRemovedOptionModule (
basePluginPath ++ [ "sessionDirectory" ]
) "This plugin no longer has session support.")
]
++ (mapAttrsToList
(
old: new:
mkRenamedOptionModule (basePluginPath ++ [ old ]) (basePluginPath ++ [ "settings" ] ++ new)
)
{ {
header = [ old = "header";
new = [
"config" "config"
"header" "header"
]; ];
footer = [ }
{
old = "footer";
new = [
"config" "config"
"footer" "footer"
]; ];
center = [ }
{
old = "center";
new = [
"config" "config"
"shortcut" "shortcut"
]; ];
hideStatusline = [ }
{
old = "hideStatusline";
new = [
"hide" "hide"
"statusline" "statusline"
]; ];
hideTabline = [ }
{
old = "hideTabline";
new = [
"hide" "hide"
"tabline" "tabline"
]; ];
} }
) [
++ (mapAttrsToList
(
old: new:
mkRenamedOptionModule
(
basePluginPath
++ [
"preview" "preview"
old "command"
] ]
)
(
basePluginPath
++ [
"settings"
"preview"
new
]
)
)
{ {
command = "command"; old = [
file = "file_path"; "preview"
height = "file_height"; "file"
width = "file_width"; ];
new = [
"preview"
"file_path"
];
} }
); {
old = [
"preview"
"height"
];
new = [
"preview"
"file_height"
];
}
{
old = [
"preview"
"width"
];
new = [
"preview"
"file_width"
];
}
];
imports = [
(mkRemovedOptionModule [
"plugins"
"dashboard"
"sessionDirectory"
] "This plugin no longer has session support.")
];
settingsExample = { settingsExample = {
theme = "hyper"; theme = "hyper";

View file

@ -15,21 +15,12 @@ mkVimPlugin {
# TODO introduced 2024-03-01: remove 2024-05-01 # TODO introduced 2024-03-01: remove 2024-05-01
deprecateExtraConfig = true; deprecateExtraConfig = true;
optionsRenamedToSettings = [ "mode" ]; optionsRenamedToSettings = [
imports = [ "mode"
(mkRenamedOptionModule {
[ old = "leader";
"plugins" new = "leader_key";
"emmet" }
"leader"
]
[
"plugins"
"emmet"
"settings"
"leader_key"
]
)
]; ];
settingsOptions = { settingsOptions = {

View file

@ -15,114 +15,7 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
# TODO: introduced 2024-03-12, remove on 2024-05-12 # TODO: introduced 2024-03-12, remove on 2024-05-12
deprecateExtraOptions = true; deprecateExtraOptions = true;
optionsRenamedToSettings = [ optionsRenamedToSettings = import ./renamed-options.nix;
[
"signs"
"add"
"text"
]
[
"signs"
"add"
"showCount"
]
[
"signs"
"change"
"text"
]
[
"signs"
"change"
"showCount"
]
[
"signs"
"topdelete"
"text"
]
[
"signs"
"topdelete"
"showCount"
]
[
"signs"
"changedelete"
"text"
]
[
"signs"
"changedelete"
"showCount"
]
[
"signs"
"untracked"
"text"
]
[
"signs"
"untracked"
"showCount"
]
"worktrees"
"signPriority"
"signcolumn"
"numhl"
"linehl"
"showDeleted"
[
"diffOpts"
"algorithm"
]
[
"diffOpts"
"internal"
]
[
"diffOpts"
"indentHeuristic"
]
[
"diffOpts"
"vertical"
]
[
"diffOpts"
"linematch"
]
"base"
"countChars"
"maxFileLength"
"previewConfig"
"attachToUntracked"
"updateDebounce"
"currentLineBlame"
[
"currentLineBlameOpts"
"virtText"
]
[
"currentLineBlameOpts"
"virtTextPos"
]
[
"currentLineBlameOpts"
"delay"
]
[
"currentLineBlameOpts"
"ignoreWhitespace"
]
[
"currentLineBlameOpts"
"virtTextPriority"
]
"trouble"
"wordDiff"
"debugMode"
];
imports = imports =
let let
basePluginPaths = [ basePluginPaths = [
@ -165,29 +58,6 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
helpers.mkDeprecatedSubOptionModule optionPath "Please define the `${hlg}` highlight group instead." helpers.mkDeprecatedSubOptionModule optionPath "Please define the `${hlg}` highlight group instead."
) highlightRemovals) ) highlightRemovals)
++ [ ++ [
(mkRenamedOptionModule (
basePluginPaths
++ [
"onAttach"
"function"
]
) (settingsPath ++ [ "on_attach" ]))
(mkRenamedOptionModule
(
basePluginPaths
++ [
"watchGitDir"
"enable"
]
)
(
settingsPath
++ [
"watch_gitdir"
"enable"
]
)
)
(mkRemovedOptionModule ( (mkRemovedOptionModule (
basePluginPaths basePluginPaths
++ [ ++ [
@ -195,43 +65,6 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
"interval" "interval"
] ]
) "The option has been removed from upstream.") ) "The option has been removed from upstream.")
(mkRenamedOptionModule
(
basePluginPaths
++ [
"watchGitDir"
"followFiles"
]
)
(
settingsPath
++ [
"watch_gitdir"
"follow_files"
]
)
)
(mkRenamedOptionModule (
basePluginPaths
++ [
"statusFormatter"
"function"
]
) (settingsPath ++ [ "status_formatter" ]))
(mkRenamedOptionModule (
basePluginPaths
++ [
"currentLineBlameFormatter"
"normal"
]
) (settingsPath ++ [ "current_line_blame_formatter" ]))
(mkRenamedOptionModule (
basePluginPaths
++ [
"currentLineBlameFormatter"
"nonCommitted"
]
) (settingsPath ++ [ "current_line_blame_formatter_nc" ]))
(helpers.mkDeprecatedSubOptionModule ( (helpers.mkDeprecatedSubOptionModule (
settingsPath settingsPath
++ [ ++ [

View file

@ -0,0 +1,156 @@
[
[
"signs"
"add"
"text"
]
[
"signs"
"add"
"showCount"
]
[
"signs"
"change"
"text"
]
[
"signs"
"change"
"showCount"
]
[
"signs"
"topdelete"
"text"
]
[
"signs"
"topdelete"
"showCount"
]
[
"signs"
"changedelete"
"text"
]
[
"signs"
"changedelete"
"showCount"
]
[
"signs"
"untracked"
"text"
]
[
"signs"
"untracked"
"showCount"
]
"worktrees"
"signPriority"
"signcolumn"
"numhl"
"linehl"
"showDeleted"
[
"diffOpts"
"algorithm"
]
[
"diffOpts"
"internal"
]
[
"diffOpts"
"indentHeuristic"
]
[
"diffOpts"
"vertical"
]
[
"diffOpts"
"linematch"
]
"base"
"countChars"
"maxFileLength"
"previewConfig"
"attachToUntracked"
"updateDebounce"
"currentLineBlame"
[
"currentLineBlameOpts"
"virtText"
]
[
"currentLineBlameOpts"
"virtTextPos"
]
[
"currentLineBlameOpts"
"delay"
]
[
"currentLineBlameOpts"
"ignoreWhitespace"
]
[
"currentLineBlameOpts"
"virtTextPriority"
]
"trouble"
"wordDiff"
"debugMode"
{
old = [
"onAttach"
"function"
];
new = "on_attach";
}
{
old = [
"watchGitDir"
"enable"
];
new = [
"watch_gitdir"
"enable"
];
}
{
old = [
"watchGitDir"
"followFiles"
];
new = [
"watch_gitdir"
"follow_files"
];
}
{
old = [
"statusFormatter"
"function"
];
new = "status_formatter";
}
{
old = [
"currentLineBlameFormatter"
"normal"
];
new = "current_line_blame_formatter";
}
{
old = [
"currentLineBlameFormatter"
"nonCommitted"
];
new = "current_line_blame_formatter_nc";
}
]

View file

@ -18,21 +18,10 @@ mkVimPlugin {
optionsRenamedToSettings = [ optionsRenamedToSettings = [
"width" "width"
"height" "height"
]; {
imports = [ old = "showLineNumbers";
(mkRenamedOptionModule new = "linenr";
[ }
"plugins"
"goyo"
"showLineNumbers"
]
[
"plugins"
"goyo"
"settings"
"linenr"
]
)
]; ];
settingsOptions = { settingsOptions = {

View file

@ -19,29 +19,14 @@ mkVimPlugin {
optionsRenamedToSettings = [ optionsRenamedToSettings = [
"detailedFirst" "detailedFirst"
"foldBlanks" "foldBlanks"
]; {
imports = old = "maxWidth";
let new = "maxwidth";
basePluginPath = [ }
"plugins" {
"ledger" old = "fillString";
]; new = "fillstring";
in }
[
(mkRenamedOptionModule (basePluginPath ++ [ "maxWidth" ]) (
basePluginPath
++ [
"settings"
"maxwidth"
]
))
(mkRenamedOptionModule (basePluginPath ++ [ "fillString" ]) (
basePluginPath
++ [
"settings"
"fillstring"
]
))
]; ];
extraOptions = { extraOptions = {

View file

@ -30,16 +30,14 @@ mkVimPlugin {
"port" "port"
"pageTitle" "pageTitle"
"theme" "theme"
]; {
imports = [ old = "fileTypes";
(mkRenamedOptionModule new = "filetypes";
[ "plugins" "markdown-preview" "fileTypes" ] }
[ "plugins" "markdown-preview" "settings" "filetypes" ] {
) old = "browserFunc";
(mkRenamedOptionModule new = "browserfunc";
[ "plugins" "markdown-preview" "browserFunc" ] }
[ "plugins" "markdown-preview" "settings" "browserfunc" ]
)
]; ];
settingsOptions = { settingsOptions = {

View file

@ -46,6 +46,10 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
"logger" "logger"
"floatPrecision" "floatPrecision"
] ]
{
old = "modules";
new = "load";
}
]; ];
imports = [ imports = [
./deprecations.nix ./deprecations.nix

View file

@ -7,13 +7,6 @@ let
in in
{ {
imports = [ imports = [
(lib.mkRenamedOptionModule (basePluginPath ++ [ "modules" ]) (
basePluginPath
++ [
"settings"
"load"
]
))
(lib.mkRemovedOptionModule ( (lib.mkRemovedOptionModule (
basePluginPath basePluginPath
++ [ ++ [

View file

@ -32,6 +32,10 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
"shouldAttach" "shouldAttach"
"tempDir" "tempDir"
"updateInInsert" "updateInInsert"
{
old = "sourcesItems";
new = "sources";
}
]; ];
imports = imports =
@ -45,12 +49,10 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
namespace namespace
"none-ls" "none-ls"
]; ];
settingsPath = basePluginPath ++ [ "settings" ];
in in
[ [
./sources.nix ./sources.nix
(lib.mkRenamedOptionModule oldPluginPath basePluginPath) (lib.mkRenamedOptionModule oldPluginPath basePluginPath)
(lib.mkRenamedOptionModule (basePluginPath ++ [ "sourcesItems" ]) (settingsPath ++ [ "sources" ]))
]; ];
settingsExample = { settingsExample = {

View file

@ -28,23 +28,17 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
"mapBs" "mapBs"
"mapCH" "mapCH"
"mapCW" "mapCW"
{
old = "disabledFiletypes";
new = "disable_filetype";
}
{
old = "enableAfterQuote";
new = "enable_afterquote";
}
]; ];
imports = imports = [
let (mkRemovedOptionModule [ "plugins" "nvim-autopairs" "pairs" ] ''
basePluginPaths = [
"plugins"
"nvim-autopairs"
];
settingsPath = basePluginPaths ++ [ "settings" ];
in
[
(mkRenamedOptionModule (basePluginPaths ++ [ "disabledFiletypes" ]) (
settingsPath ++ [ "disable_filetype" ]
))
(mkRenamedOptionModule (basePluginPaths ++ [ "enableAfterQuote" ]) (
settingsPath ++ [ "enable_afterquote" ]
))
(mkRemovedOptionModule (basePluginPaths ++ [ "pairs" ]) ''
This option was having no effect. This option was having no effect.
If you want to customize pairs, please use `luaConfig` to define them as described in the plugin documentation. If you want to customize pairs, please use `luaConfig` to define them as described in the plugin documentation.
'') '')

View file

@ -116,6 +116,22 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
"imgTextFunc" "imgTextFunc"
] ]
"yamlParser" "yamlParser"
{
old = "finder";
new = [
"settings"
"picker"
"name"
];
}
# https://github.com/epwalsh/obsidian.nvim/blob/656d9c2c64528839db8b2d9a091843b3c90155a2/CHANGELOG.md?plain=1#L184
{
old = [
"completion"
"newNotesLocation"
];
new = "new_notes_location";
}
]; ];
imports = imports =
let let
@ -131,32 +147,6 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
basePluginPath ++ [ "workspaces" ] basePluginPath ++ [ "workspaces" ]
) "Please use `plugins.obsidian.settings.workspaces` instead." ) "Please use `plugins.obsidian.settings.workspaces` instead."
) )
(mkRenamedOptionModule (basePluginPath ++ [ "finder" ]) (
basePluginPath
++ [
"settings"
"picker"
"name"
]
))
(
# https://github.com/epwalsh/obsidian.nvim/blob/656d9c2c64528839db8b2d9a091843b3c90155a2/CHANGELOG.md?plain=1#L184
mkRenamedOptionModule
(
basePluginPath
++ [
"completion"
"newNotesLocation"
]
)
(
basePluginPath
++ [
"settings"
"new_notes_location"
]
)
)
( (
# We have to remove the option here because the user could set old-style camelCase options in each checkbox element. # We have to remove the option here because the user could set old-style camelCase options in each checkbox element.
mkRemovedOptionModule ( mkRemovedOptionModule (

View file

@ -164,6 +164,13 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
"progress" "progress"
"minimizedBorder" "minimizedBorder"
] ]
{
old = "lspRenameAutosave";
new = [
"lsp_file_method"
"autosave_changes"
];
}
]; ];
imports = imports =
let let
@ -171,19 +178,11 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
"plugins" "plugins"
"oil" "oil"
]; ];
settingsPath = basePluginPath ++ [ "settings" ];
in in
[ [
(mkRemovedOptionModule ( (mkRemovedOptionModule (
basePluginPath ++ [ "columns" ] basePluginPath ++ [ "columns" ]
) "Use `plugins.oil.settings.columns` instead but beware, the format has changed.") ) "Use `plugins.oil.settings.columns` instead but beware, the format has changed.")
(mkRenamedOptionModule (basePluginPath ++ [ "lspRenameAutosave" ]) (
settingsPath
++ [
"lsp_file_method"
"autosave_changes"
]
))
(mkRemovedOptionModule ( (mkRemovedOptionModule (
basePluginPath ++ [ "trashCommand" ] basePluginPath ++ [ "trashCommand" ]
) "This option has been deprecated by upstream.") ) "This option has been deprecated by upstream.")

View file

@ -5,7 +5,7 @@
... ...
}: }:
let let
inherit (lib) mkRemovedOptionModule mkRenamedOptionModule types; inherit (lib) mkRemovedOptionModule types;
inherit (lib.nixvim) defaultNullOpts; inherit (lib.nixvim) defaultNullOpts;
in in
lib.nixvim.neovim-plugin.mkNeovimPlugin { lib.nixvim.neovim-plugin.mkNeovimPlugin {
@ -18,121 +18,15 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
# TODO introduced 2024-04-07: remove 2024-06-07 # TODO introduced 2024-04-07: remove 2024-06-07
deprecateExtraOptions = true; deprecateExtraOptions = true;
optionsRenamedToSettings = [ optionsRenamedToSettings = import ./renamed-options.nix;
"envFile"
"encodeUrl"
"skipSslVerification"
"customDynamicVariables"
[
"highlight"
"timeout"
]
];
imports = imports =
let let
basePluginPath = [ basePluginPath = [
"plugins" "plugins"
"rest" "rest"
]; ];
settingsPath = basePluginPath ++ [ "settings" ];
in in
[ [
(mkRenamedOptionModule (basePluginPath ++ [ "resultSplitHorizontal" ]) (
settingsPath
++ [
"result"
"split"
"horizontal"
]
))
(mkRenamedOptionModule (basePluginPath ++ [ "resultSplitInPlace" ]) (
settingsPath
++ [
"result"
"split"
"in_place"
]
))
(mkRenamedOptionModule (basePluginPath ++ [ "stayInCurrentWindowAfterSplit" ]) (
settingsPath
++ [
"result"
"split"
"stay_in_current_window_after_split"
]
))
(mkRenamedOptionModule
(
basePluginPath
++ [
"result"
"showUrl"
]
)
(
settingsPath
++ [
"result"
"behavior"
"show_info"
"url"
]
)
)
(mkRenamedOptionModule
(
basePluginPath
++ [
"result"
"showHeaders"
]
)
(
settingsPath
++ [
"result"
"behavior"
"show_info"
"headers"
]
)
)
(mkRenamedOptionModule
(
basePluginPath
++ [
"result"
"showHttpInfo"
]
)
(
settingsPath
++ [
"result"
"behavior"
"show_info"
"http_info"
]
)
)
(mkRenamedOptionModule
(
basePluginPath
++ [
"result"
"showCurlCommand"
]
)
(
settingsPath
++ [
"result"
"behavior"
"show_info"
"curl_command"
]
)
)
(mkRemovedOptionModule (mkRemovedOptionModule
( (
basePluginPath basePluginPath
@ -146,48 +40,19 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
Refer to the documentation for more information. Refer to the documentation for more information.
'' ''
) )
(mkRenamedOptionModule
(
basePluginPath
++ [
"result"
"formatters"
] ]
) ++
map
( (
settingsPath option:
++ [ mkRemovedOptionModule (basePluginPath ++ [ option ]) ''
"result"
"behavior"
"formatters"
]
)
)
(mkRenamedOptionModule
(
basePluginPath
++ [
"highlight"
"enabled"
]
)
(
settingsPath
++ [
"highlight"
"enable"
]
)
)
(mkRemovedOptionModule (basePluginPath ++ [ "jumpToRequest" ]) ''
This option has been deprecated upstream. This option has been deprecated upstream.
'') ''
(mkRemovedOptionModule (basePluginPath ++ [ "yankDryRun" ]) '' )
This option has been deprecated upstream. [
'') "jumpToRequest"
(mkRemovedOptionModule (basePluginPath ++ [ "searchBack" ]) '' "yankDryRun"
This option has been deprecated upstream. "searchBack"
'')
]; ];
settingsOptions = { settingsOptions = {

View file

@ -0,0 +1,105 @@
[
"envFile"
"encodeUrl"
"skipSslVerification"
"customDynamicVariables"
[
"highlight"
"timeout"
]
{
old = "resultSplitHorizontal";
new = [
"result"
"split"
"horizontal"
];
}
{
old = "resultSplitInPlace";
new = [
"result"
"split"
"in_place"
];
}
{
old = "stayInCurrentWindowAfterSplit";
new = [
"result"
"split"
"stay_in_current_window_after_split"
];
}
{
old = [
"result"
"showUrl"
];
new = [
"result"
"behavior"
"show_info"
"url"
];
}
{
old = [
"result"
"showHeaders"
];
new = [
"result"
"behavior"
"show_info"
"headers"
];
}
{
old = [
"result"
"showHttpInfo"
];
new = [
"result"
"behavior"
"show_info"
"http_info"
];
}
{
old = [
"result"
"showCurlCommand"
];
new = [
"result"
"behavior"
"show_info"
"curl_command"
];
}
{
old = [
"result"
"formatters"
];
new = [
"result"
"behavior"
"formatters"
];
}
{
old = [
"highlight"
"enabled"
];
new = [
"highlight"
"enable"
];
}
]

View file

@ -15,45 +15,44 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
optionsRenamedToSettings = [ optionsRenamedToSettings = [
"show_jumps" "show_jumps"
"min_jump" "min_jump"
{
old = "delay";
new = [
"popup"
"delay_ms"
];
}
{
old = "increment";
new = [
"popup"
"inc_ms"
];
}
{
old = "blend";
new = [
"popup"
"blend"
];
}
{
old = "width";
new = [
"popup"
"width"
];
}
]; ];
imports = imports =
let lib.mapAttrsToList (old: message: mkRemovedOptionModule [ "plugins" "specs" old ] message)
basePluginPath = [ {
"plugins" color = "Please, use `settings.popup.winhl` directly.";
"specs" fader = "Please, use `settings.popup.fader` directly.";
]; resizer = "Please, use `settings.popup.resizer` directly.";
settingsPath = basePluginPath ++ [ "settings" ]; ignored_filetypes = "Please, use `settings.ignore_filetypes` instead.";
renameToPopup = ignored_buffertypes = "Please, use `settings.ignore_buftypes` instead.";
old: new: };
mkRenamedOptionModule (basePluginPath ++ [ old ]) (
settingsPath
++ [
"popup"
new
]
);
in
[
(renameToPopup "delay" "delay_ms")
(renameToPopup "increment" "inc_ms")
(renameToPopup "blend" "blend")
(renameToPopup "width" "width")
(mkRemovedOptionModule (
basePluginPath ++ [ "color" ]
) "Please, use `settings.popup.winhl` directly.")
(mkRemovedOptionModule (
basePluginPath ++ [ "fader" ]
) "Please, use `settings.popup.fader` directly.")
(mkRemovedOptionModule (
basePluginPath ++ [ "resizer" ]
) "Please, use `settings.popup.resizer` directly.")
(mkRemovedOptionModule (
basePluginPath ++ [ "ignored_filetypes" ]
) "Please, use `settings.ignore_filetypes` instead.")
(mkRemovedOptionModule (
basePluginPath ++ [ "ignored_buffertypes" ]
) "Please, use `settings.ignore_buftypes` instead.")
];
settingsOptions = { settingsOptions = {
show_jumps = helpers.defaultNullOpts.mkBool true '' show_jumps = helpers.defaultNullOpts.mkBool true ''

View file

@ -39,25 +39,6 @@ mkVimPlugin {
"customFooter" "customFooter"
"relativePath" "relativePath"
"useEnv" "useEnv"
];
imports =
map
(
option:
mkRenamedOptionModule
[
"plugins"
"startify"
option.old
]
[
"plugins"
"startify"
"settings"
option.new
]
)
[
{ {
old = "updateOldFiles"; old = "updateOldFiles";
new = "update_oldfiles"; new = "update_oldfiles";

View file

@ -26,14 +26,7 @@ let
]; ];
settingsPath = basePluginPath ++ [ "settings" ]; settingsPath = basePluginPath ++ [ "settings" ];
in in
builtins.map ( lib.nixvim.mkSettingsRenamedOptionModules basePluginPath settingsPath optionsRenamedToSettings;
option:
let
optionPath = lib.toList option;
optionPathSnakeCase = map lib.nixvim.toSnakeCase optionPath;
in
lib.mkRenamedOptionModule (basePluginPath ++ optionPath) (settingsPath ++ optionPathSnakeCase)
) optionsRenamedToSettings;
}; };
module = module =

View file

@ -21,30 +21,27 @@ mkExtension {
"telescope" "telescope"
"extensions" "extensions"
]; ];
oldPath = telescopeExtensionsPath ++ [ "media_files" ];
newPath = telescopeExtensionsPath ++ [ "media-files" ];
in in
mapAttrsToList lib.nixvim.mkSettingsRenamedOptionModules oldPath newPath [
( "enable"
oldOptionName: newOptionPath: "package"
mkRenamedOptionModule (
telescopeExtensionsPath
++ [
"media_files"
oldOptionName
]
) (telescopeExtensionsPath ++ [ "media-files" ] ++ newOptionPath)
)
{ {
enable = [ "enable" ]; old = "filetypes";
package = [ "package" ]; new = [
filetypes = [
"settings" "settings"
"filetypes" "filetypes"
]; ];
find_cmd = [ }
{
old = "find_cmd";
new = [
"settings" "settings"
"find_cmd" "find_cmd"
]; ];
}; }
];
extraOptions = { extraOptions = {
dependencies = dependencies =

View file

@ -193,6 +193,27 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
"initSelection" "initSelection"
"scopeIncremental" "scopeIncremental"
] ]
{
old = "customCaptures";
new = [
"highlight"
"custom_captures"
];
}
{
old = "disabledLanguages";
new = [
"highlight"
"disable"
];
}
{
old = "indent";
new = [
"indent"
"enable"
];
}
]; ];
imports = imports =
@ -201,30 +222,10 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
"plugins" "plugins"
"treesitter" "treesitter"
]; ];
settingsPath = basePluginPath ++ [ "settings" ];
in in
[ [
(lib.mkRenamedOptionModule (basePluginPath ++ [ "moduleConfig" ]) settingsPath) (lib.mkRenamedOptionModule (basePluginPath ++ [ "moduleConfig" ]) (
(lib.mkRenamedOptionModule (basePluginPath ++ [ "customCaptures" ]) ( basePluginPath ++ [ "settings" ]
settingsPath
++ [
"highlight"
"custom_captures"
]
))
(lib.mkRenamedOptionModule (basePluginPath ++ [ "disabledLanguages" ]) (
settingsPath
++ [
"highlight"
"disable"
]
))
(lib.mkRenamedOptionModule (basePluginPath ++ [ "indent" ]) (
settingsPath
++ [
"indent"
"enable"
]
)) ))
]; ];

View file

@ -13,42 +13,72 @@ mkVimPlugin {
# TODO introduced 2024-02-22: remove 2024-04-22 # TODO introduced 2024-02-22: remove 2024-04-22
deprecateExtraConfig = true; deprecateExtraConfig = true;
imports = optionsRenamedToSettings = [
let
basePluginPath = [
"plugins"
"undotree"
];
in
mapAttrsToList
(
old: new:
mkRenamedOptionModule (basePluginPath ++ [ old ]) (
basePluginPath
++ [
"settings"
new
]
)
)
{ {
windowLayout = "WindowLayout"; old = "windowLayout";
shortIndicators = "ShortIndicators"; new = "WindowLayout";
windowWidth = "WindowWidth"; }
diffHeight = "DiffHeight"; {
autoOpenDiff = "AutoOpenDiff"; old = "shortIndicators";
focusOnToggle = "FocusOnToggle"; new = "ShortIndicators";
treeNodeShape = "TreeNodeShape"; }
diffCommand = "DiffCommand"; {
relativeTimestamp = "RelativeTimestamp"; old = "windowWidth";
highlightChangedText = "HighlightChangedText"; new = "WindowWidth";
highlightChangesWithSign = "HighlightChangesWithSign"; }
highlightSyntaxAdd = "HighlightSyntaxAdd"; {
highlightSyntaxChange = "HighlightSyntaxChange"; old = "diffHeight";
highlightSyntaxDel = "HighlightSyntaxDel"; new = "DiffHeight";
showHelpLine = "ShowHelpLine"; }
showCursorLine = "ShowCursorLine"; {
}; old = "autoOpenDiff";
new = "AutoOpenDiff";
}
{
old = "focusOnToggle";
new = "FocusOnToggle";
}
{
old = "treeNodeShape";
new = "TreeNodeShape";
}
{
old = "diffCommand";
new = "DiffCommand";
}
{
old = "relativeTimestamp";
new = "RelativeTimestamp";
}
{
old = "highlightChangedText";
new = "HighlightChangedText";
}
{
old = "highlightChangesWithSign";
new = "HighlightChangesWithSign";
}
{
old = "highlightSyntaxAdd";
new = "HighlightSyntaxAdd";
}
{
old = "highlightSyntaxChange";
new = "HighlightSyntaxChange";
}
{
old = "highlightSyntaxDel";
new = "HighlightSyntaxDel";
}
{
old = "showHelpLine";
new = "ShowHelpLine";
}
{
old = "showCursorLine";
new = "ShowCursorLine";
}
];
settingsExample = { settingsExample = {
WindowLayout = 4; WindowLayout = 4;

View file

@ -77,142 +77,15 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
maintainers = [ lib.maintainers.khaneliman ]; maintainers = [ lib.maintainers.khaneliman ];
# TODO: introduced 2024-08-05: remove after 24.11 # TODO: introduced 2024-08-05: remove after 24.11
optionsRenamedToSettings = [ optionsRenamedToSettings = import ./renamed-options.nix;
"hidden"
"icons"
"ignoreMissing"
"keyLabels"
"layout"
"motions"
"operators"
[
"plugins"
"mark"
]
[
"plugins"
"registers"
]
[
"plugins"
"spelling"
]
[
"plugins"
"presets"
"textObjects"
]
[
"plugins"
"presets"
"operators"
]
[
"plugins"
"presets"
"motions"
]
[
"plugins"
"presets"
"windows"
]
[
"plugins"
"presets"
"nav"
]
[
"plugins"
"presets"
"z"
]
[
"plugins"
"presets"
"g"
]
"popupMappings"
"showHelp"
"showKeys"
"triggersBlackList"
"triggersNoWait"
];
imports = imports =
let let
basePluginPath = [ basePluginPath = [
"plugins" "plugins"
"which-key" "which-key"
]; ];
settingsPath = basePluginPath ++ [ "settings" ];
in in
[ [
(lib.mkRenamedOptionModule
(
basePluginPath
++ [
"disable"
"buftypes"
]
)
(
settingsPath
++ [
"disable"
"bt"
]
)
)
(lib.mkRenamedOptionModule
(
basePluginPath
++ [
"disable"
"filetypes"
]
)
(
settingsPath
++ [
"disable"
"ft"
]
)
)
(lib.mkRenamedOptionModule
(
basePluginPath
++ [
"window"
"winblend"
]
)
(
settingsPath
++ [
"win"
"wo"
"winblend"
]
)
)
(lib.mkRenamedOptionModule
(
basePluginPath
++ [
"window"
"border"
]
)
(
settingsPath
++ [
"win"
"border"
]
)
)
(lib.mkRemovedOptionModule (basePluginPath ++ [ "triggers" ]) '' (lib.mkRemovedOptionModule (basePluginPath ++ [ "triggers" ]) ''
Please use `plugins.which-key.settings.triggers` instead. Please use `plugins.which-key.settings.triggers` instead.

View file

@ -0,0 +1,102 @@
[
"hidden"
"icons"
"ignoreMissing"
"keyLabels"
"layout"
"motions"
"operators"
[
"plugins"
"mark"
]
[
"plugins"
"registers"
]
[
"plugins"
"spelling"
]
[
"plugins"
"presets"
"textObjects"
]
[
"plugins"
"presets"
"operators"
]
[
"plugins"
"presets"
"motions"
]
[
"plugins"
"presets"
"windows"
]
[
"plugins"
"presets"
"nav"
]
[
"plugins"
"presets"
"z"
]
[
"plugins"
"presets"
"g"
]
"popupMappings"
"showHelp"
"showKeys"
"triggersBlackList"
"triggersNoWait"
{
old = [
"disable"
"buftypes"
];
new = [
"disable"
"bt"
];
}
{
old = [
"disable"
"filetypes"
];
new = [
"disable"
"ft"
];
}
{
old = [
"window"
"winblend"
];
new = [
"win"
"wo"
"winblend"
];
}
{
old = [
"window"
"border"
];
new = [
"win"
"border"
];
}
]

View file

@ -15,20 +15,11 @@ mkVimPlugin {
# TODO introduced 2024-03-02: remove 2024-05-02 # TODO introduced 2024-03-02: remove 2024-05-02
deprecateExtraConfig = true; deprecateExtraConfig = true;
imports = [ optionsRenamedToSettings = [
(mkRenamedOptionModule {
[ old = "formatOnSave";
"plugins" new = "fmt_autosave";
"zig" }
"formatOnSave"
]
[
"plugins"
"zig"
"settings"
"fmt_autosave"
]
)
]; ];
settingsOptions = { settingsOptions = {

View file

@ -13,302 +13,158 @@ let
settingsPath = newPluginBasePath ++ [ "settings" ]; settingsPath = newPluginBasePath ++ [ "settings" ];
renamedOptions = [ renamedOptions = [
{ [
old = [
"performance" "performance"
"debounce" "debounce"
]; ]
} [
{
old = [
"performance" "performance"
"throttle" "throttle"
]; ]
} [
{
old = [
"performance" "performance"
"fetchingTimeout" "fetchingTimeout"
]; ]
new = [ [
"performance"
"fetching_timeout"
];
}
{
old = [
"performance" "performance"
"asyncBudget" "asyncBudget"
]; ]
new = [ [
"performance"
"async_budget"
];
}
{
old = [
"performance" "performance"
"maxViewEntries" "maxViewEntries"
]; ]
new = [ "mapping"
"performance" [
"max_view_entries"
];
}
{ old = [ "mapping" ]; }
{
old = [
"completion" "completion"
"keywordLength" "keywordLength"
]; ]
new = [ [
"completion"
"keyword_length"
];
}
{
old = [
"completion" "completion"
"keywordPattern" "keywordPattern"
]; ]
new = [ [
"completion"
"keyword_pattern"
];
}
{
old = [
"completion" "completion"
"autocomplete" "autocomplete"
]; ]
} [
{
old = [
"completion" "completion"
"completeopt" "completeopt"
]; ]
} [
{
old = [
"confirmation" "confirmation"
"getCommitCharacters" "getCommitCharacters"
]; ]
new = [ [
"confirmation"
"get_commit_characters"
];
}
{
old = [
"formatting" "formatting"
"expandableIndicator" "expandableIndicator"
]; ]
new = [ [
"formatting"
"expandable_indicator"
];
}
{
old = [
"formatting" "formatting"
"fields" "fields"
]; ]
} [
{
old = [
"formatting" "formatting"
"format" "format"
]; ]
} [
{
old = [
"matching" "matching"
"disallowFuzzyMatching" "disallowFuzzyMatching"
]; ]
new = [ [
"matching"
"disallow_fuzzy_matching"
];
}
{
old = [
"matching" "matching"
"disallowFullfuzzyMatching" "disallowFullfuzzyMatching"
]; ]
new = [ [
"matching"
"disallow_fullfuzzy_matching"
];
}
{
old = [
"matching" "matching"
"disallowPartialFuzzyMatching" "disallowPartialFuzzyMatching"
]; ]
new = [ [
"matching"
"disallow_partial_fuzzy_matching"
];
}
{
old = [
"matching" "matching"
"disallowPartialMatching" "disallowPartialMatching"
]; ]
new = [ [
"matching"
"disallow_partial_matching"
];
}
{
old = [
"matching" "matching"
"disallowPrefixUnmatching" "disallowPrefixUnmatching"
]; ]
new = [ [
"matching"
"disallow_prefix_unmatching"
];
}
{
old = [
"sorting" "sorting"
"priorityWeight" "priorityWeight"
]; ]
new = [ [
"sorting"
"priority_weight"
];
}
{
old = [
"view" "view"
"entries" "entries"
]; ]
} [
{
old = [
"view" "view"
"docs" "docs"
"autoOpen" "autoOpen"
]; ]
new = [ [
"view"
"docs"
"auto_open"
];
}
{
old = [
"window" "window"
"completion" "completion"
"border" "border"
]; ]
} [
{
old = [
"window" "window"
"completion" "completion"
"winhighlight" "winhighlight"
]; ]
} [
{
old = [
"window" "window"
"completion" "completion"
"zindex" "zindex"
]; ]
} [
{
old = [
"window" "window"
"completion" "completion"
"scrolloff" "scrolloff"
]; ]
} [
{
old = [
"window" "window"
"completion" "completion"
"colOffset" "colOffset"
]; ]
new = [ [
"window"
"completion"
"col_offset"
];
}
{
old = [
"window" "window"
"completion" "completion"
"sidePadding" "sidePadding"
]; ]
new = [ [
"window"
"completion"
"side_padding"
];
}
{
old = [
"window" "window"
"completion" "completion"
"scrollbar" "scrollbar"
]; ]
} [
{
old = [
"window" "window"
"documentation" "documentation"
"border" "border"
]; ]
} [
{
old = [
"window" "window"
"documentation" "documentation"
"winhighlight" "winhighlight"
]; ]
} [
{
old = [
"window" "window"
"documentation" "documentation"
"zindex" "zindex"
]; ]
} [
{
old = [
"window" "window"
"documentation" "documentation"
"maxWidth" "maxWidth"
]; ]
new = [ [
"window"
"documentation"
"max_width"
];
}
{
old = [
"window" "window"
"documentation" "documentation"
"maxHeight" "maxHeight"
]; ]
new = [ "experimental"
"window"
"documentation"
"max_height"
];
}
{ old = [ "experimental" ]; }
]; ];
renameWarnings = map ( renameWarnings =
rename: lib.nixvim.mkSettingsRenamedOptionModules oldPluginBasePath settingsPath
mkRenamedOptionModule (oldPluginBasePath ++ rename.old) (settingsPath ++ (rename.new or rename.old)) renamedOptions;
) renamedOptions;
in in
{ {
imports = renameWarnings ++ [ imports = renameWarnings ++ [

View file

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

View file

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

View file

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