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,26 +28,21 @@ 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 = [ Use the top-level `keymaps` option to create a keymap that runs :ASToggle
"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
keymaps = [ keymaps = [
{ key = "<leader>s"; action = "<cmd>ASToggle<CR>"; } { key = "<leader>s"; action = "<cmd>ASToggle<CR>"; }
]; ];
'') '')
]; ];
settingsOptions = { settingsOptions = {
enabled = defaultNullOpts.mkBool true '' enabled = defaultNullOpts.mkBool true ''

View file

@ -14,82 +14,12 @@ 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" Please switch to `cwd_change_handling` with just a boolean value.
"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.
'')
];
settingsOptions = { settingsOptions = {
enabled = defaultNullOpts.mkBool true '' enabled = defaultNullOpts.mkBool true ''

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,45 +168,27 @@ 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"
]
)
(
settingsPath
++ [
"icons"
"filetype"
"enabled"
]
)
)
] ]
++ (map ++
( map
name: (
mkRemovedOptionModule ( name:
basePluginPath mkRemovedOptionModule (
++ [ basePluginPath
"icons" ++ [
name "icons"
] name
) "Use `settings.icons.${name}` instead, but you should now use the real `snake_case` key names." ]
) ) "Use `settings.icons.${name}` instead, but you should now use the real `snake_case` key names."
[ )
"alternate" [
"current" "alternate"
"inactive" "current"
"modified" "inactive"
"pinned" "modified"
"visible" "pinned"
] "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,60 +25,61 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
"colorizer" "colorizer"
]; ];
optionsToRename = [ # {
"RGB" # old = ["userDefaultOptions" "RGB"]; }
"RRGGBB" # new = ["settings" "user_default_options" "RGB"];
"names" # }
"RRGGBBAA" userOptsRenames =
"AARRGGBB" map
"rgb_fn" (name: {
"hsl_fn" old = [
"tailwind"
"sass"
"virtualtext"
"virtualtext_inline"
"virtualtext_mode"
"always_update"
];
renameOption =
optionName:
lib.mkRenamedOptionModule
(
oldPluginPath
++ [
"userDefaultOptions" "userDefaultOptions"
optionName name
] ];
) new = [
(
newPluginPath
++ [
"settings" "settings"
"user_default_options" "user_default_options"
optionName name
] ];
); })
[
"RGB"
"RRGGBB"
"names"
"RRGGBBAA"
"AARRGGBB"
"rgb_fn"
"hsl_fn"
"tailwind"
"sass"
"virtualtext"
"virtualtext_inline"
"virtualtext_mode"
"always_update"
];
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,32 +33,21 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
optionsRenamedToSettings = [ optionsRenamedToSettings = [
"xdg" "xdg"
"autoStart" "autoStart"
]; {
imports = old = "recommendedKeymaps";
let new = [
basePath = [ "keymap"
"plugins" "recommended"
"coq-nvim"
]; ];
settingsPath = basePath ++ [ "settings" ]; }
in {
[ old = "alwaysComplete";
(lib.mkRenamedOptionModule (basePath ++ [ "recommendedKeymaps" ]) ( new = [
settingsPath "completion"
++ [ "always"
"keymap" ];
"recommended" }
] ];
))
(lib.mkRenamedOptionModule (basePath ++ [ "alwaysComplete" ]) (
settingsPath
++ [
"completion"
"always"
]
))
];
callSetup = false; callSetup = false;
settingsOptions = { settingsOptions = {

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 = [ old = "header";
"plugins" new = [
"dashboard" "config"
"header"
]; ];
in }
{
old = "footer";
new = [
"config"
"footer"
];
}
{
old = "center";
new = [
"config"
"shortcut"
];
}
{
old = "hideStatusline";
new = [
"hide"
"statusline"
];
}
{
old = "hideTabline";
new = [
"hide"
"tabline"
];
}
[ [
(mkRemovedOptionModule ( "preview"
basePluginPath ++ [ "sessionDirectory" ] "command"
) "This plugin no longer has session support.")
] ]
++ (mapAttrsToList {
( old = [
old: new: "preview"
mkRenamedOptionModule (basePluginPath ++ [ old ]) (basePluginPath ++ [ "settings" ] ++ new) "file"
) ];
{ new = [
header = [ "preview"
"config" "file_path"
"header" ];
]; }
footer = [ {
"config" old = [
"footer" "preview"
]; "height"
center = [ ];
"config" new = [
"shortcut" "preview"
]; "file_height"
hideStatusline = [ ];
"hide" }
"statusline" {
]; old = [
hideTabline = [ "preview"
"hide" "width"
"tabline" ];
]; new = [
} "preview"
) "file_width"
++ (mapAttrsToList ];
( }
old: new: ];
mkRenamedOptionModule imports = [
( (mkRemovedOptionModule [
basePluginPath "plugins"
++ [ "dashboard"
"preview" "sessionDirectory"
old ] "This plugin no longer has session support.")
] ];
)
(
basePluginPath
++ [
"settings"
"preview"
new
]
)
)
{
command = "command";
file = "file_path";
height = "file_height";
width = "file_width";
}
);
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,30 +19,15 @@ mkVimPlugin {
optionsRenamedToSettings = [ optionsRenamedToSettings = [
"detailedFirst" "detailedFirst"
"foldBlanks" "foldBlanks"
{
old = "maxWidth";
new = "maxwidth";
}
{
old = "fillString";
new = "fillstring";
}
]; ];
imports =
let
basePluginPath = [
"plugins"
"ledger"
];
in
[
(mkRenamedOptionModule (basePluginPath ++ [ "maxWidth" ]) (
basePluginPath
++ [
"settings"
"maxwidth"
]
))
(mkRenamedOptionModule (basePluginPath ++ [ "fillString" ]) (
basePluginPath
++ [
"settings"
"fillstring"
]
))
];
extraOptions = { extraOptions = {
ledgerPackage = lib.mkPackageOption pkgs "ledger" { ledgerPackage = lib.mkPackageOption pkgs "ledger" {

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,27 +28,21 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
"mapBs" "mapBs"
"mapCH" "mapCH"
"mapCW" "mapCW"
{
old = "disabledFiletypes";
new = "disable_filetype";
}
{
old = "enableAfterQuote";
new = "enable_afterquote";
}
];
imports = [
(mkRemovedOptionModule [ "plugins" "nvim-autopairs" "pairs" ] ''
This option was having no effect.
If you want to customize pairs, please use `luaConfig` to define them as described in the plugin documentation.
'')
]; ];
imports =
let
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.
If you want to customize pairs, please use `luaConfig` to define them as described in the plugin documentation.
'')
];
settingsOptions = { settingsOptions = {
disable_filetype = helpers.defaultNullOpts.mkListOf types.str [ disable_filetype = helpers.defaultNullOpts.mkListOf types.str [

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,49 +40,20 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
Refer to the documentation for more information. Refer to the documentation for more information.
'' ''
) )
(mkRenamedOptionModule ]
++
map
( (
basePluginPath option:
++ [ mkRemovedOptionModule (basePluginPath ++ [ option ]) ''
"result" This option has been deprecated upstream.
"formatters" ''
]
) )
( [
settingsPath "jumpToRequest"
++ [ "yankDryRun"
"result" "searchBack"
"behavior" ];
"formatters"
]
)
)
(mkRenamedOptionModule
(
basePluginPath
++ [
"highlight"
"enabled"
]
)
(
settingsPath
++ [
"highlight"
"enable"
]
)
)
(mkRemovedOptionModule (basePluginPath ++ [ "jumpToRequest" ]) ''
This option has been deprecated upstream.
'')
(mkRemovedOptionModule (basePluginPath ++ [ "yankDryRun" ]) ''
This option has been deprecated upstream.
'')
(mkRemovedOptionModule (basePluginPath ++ [ "searchBack" ]) ''
This option has been deprecated upstream.
'')
];
settingsOptions = { settingsOptions = {
custom_dynamic_variables = lib.mkOption { custom_dynamic_variables = lib.mkOption {

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,58 +39,39 @@ mkVimPlugin {
"customFooter" "customFooter"
"relativePath" "relativePath"
"useEnv" "useEnv"
{
old = "updateOldFiles";
new = "update_oldfiles";
}
{
old = "skipList";
new = "skiplist";
}
{
old = "useUnicode";
new = "fortune_use_unicode";
}
{
old = "skipListServer";
new = "skiplist_server";
}
{
old = "sessionSaveVars";
new = "session_savevars";
}
{
old = "sessionCmds";
new = "session_savecmds";
}
{
old = "customQuotes";
new = "custom_header_quotes";
}
{
old = "disableAtVimEnter";
new = "disable_at_vimenter";
}
]; ];
imports =
map
(
option:
mkRenamedOptionModule
[
"plugins"
"startify"
option.old
]
[
"plugins"
"startify"
"settings"
option.new
]
)
[
{
old = "updateOldFiles";
new = "update_oldfiles";
}
{
old = "skipList";
new = "skiplist";
}
{
old = "useUnicode";
new = "fortune_use_unicode";
}
{
old = "skipListServer";
new = "skiplist_server";
}
{
old = "sessionSaveVars";
new = "session_savevars";
}
{
old = "sessionCmds";
new = "session_savecmds";
}
{
old = "customQuotes";
new = "custom_header_quotes";
}
{
old = "disableAtVimEnter";
new = "disable_at_vimenter";
}
];
settingsOptions = import ./options.nix { inherit lib helpers; }; settingsOptions = import ./options.nix { inherit lib helpers; };

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 = [ old = "windowLayout";
"plugins" new = "WindowLayout";
"undotree" }
]; {
in old = "shortIndicators";
mapAttrsToList new = "ShortIndicators";
( }
old: new: {
mkRenamedOptionModule (basePluginPath ++ [ old ]) ( old = "windowWidth";
basePluginPath new = "WindowWidth";
++ [ }
"settings" {
new old = "diffHeight";
] new = "DiffHeight";
) }
) {
{ old = "autoOpenDiff";
windowLayout = "WindowLayout"; new = "AutoOpenDiff";
shortIndicators = "ShortIndicators"; }
windowWidth = "WindowWidth"; {
diffHeight = "DiffHeight"; old = "focusOnToggle";
autoOpenDiff = "AutoOpenDiff"; new = "FocusOnToggle";
focusOnToggle = "FocusOnToggle"; }
treeNodeShape = "TreeNodeShape"; {
diffCommand = "DiffCommand"; old = "treeNodeShape";
relativeTimestamp = "RelativeTimestamp"; new = "TreeNodeShape";
highlightChangedText = "HighlightChangedText"; }
highlightChangesWithSign = "HighlightChangesWithSign"; {
highlightSyntaxAdd = "HighlightSyntaxAdd"; old = "diffCommand";
highlightSyntaxChange = "HighlightSyntaxChange"; new = "DiffCommand";
highlightSyntaxDel = "HighlightSyntaxDel"; }
showHelpLine = "ShowHelpLine"; {
showCursorLine = "ShowCursorLine"; 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" ]
]; [
} "performance"
{ "throttle"
old = [ ]
"performance" [
"throttle" "performance"
]; "fetchingTimeout"
} ]
{ [
old = [ "performance"
"performance" "asyncBudget"
"fetchingTimeout" ]
]; [
new = [ "performance"
"performance" "maxViewEntries"
"fetching_timeout" ]
]; "mapping"
} [
{ "completion"
old = [ "keywordLength"
"performance" ]
"asyncBudget" [
]; "completion"
new = [ "keywordPattern"
"performance" ]
"async_budget" [
]; "completion"
} "autocomplete"
{ ]
old = [ [
"performance" "completion"
"maxViewEntries" "completeopt"
]; ]
new = [ [
"performance" "confirmation"
"max_view_entries" "getCommitCharacters"
]; ]
} [
{ old = [ "mapping" ]; } "formatting"
{ "expandableIndicator"
old = [ ]
"completion" [
"keywordLength" "formatting"
]; "fields"
new = [ ]
"completion" [
"keyword_length" "formatting"
]; "format"
} ]
{ [
old = [ "matching"
"completion" "disallowFuzzyMatching"
"keywordPattern" ]
]; [
new = [ "matching"
"completion" "disallowFullfuzzyMatching"
"keyword_pattern" ]
]; [
} "matching"
{ "disallowPartialFuzzyMatching"
old = [ ]
"completion" [
"autocomplete" "matching"
]; "disallowPartialMatching"
} ]
{ [
old = [ "matching"
"completion" "disallowPrefixUnmatching"
"completeopt" ]
]; [
} "sorting"
{ "priorityWeight"
old = [ ]
"confirmation" [
"getCommitCharacters" "view"
]; "entries"
new = [ ]
"confirmation" [
"get_commit_characters" "view"
]; "docs"
} "autoOpen"
{ ]
old = [ [
"formatting" "window"
"expandableIndicator" "completion"
]; "border"
new = [ ]
"formatting" [
"expandable_indicator" "window"
]; "completion"
} "winhighlight"
{ ]
old = [ [
"formatting" "window"
"fields" "completion"
]; "zindex"
} ]
{ [
old = [ "window"
"formatting" "completion"
"format" "scrolloff"
]; ]
} [
{ "window"
old = [ "completion"
"matching" "colOffset"
"disallowFuzzyMatching" ]
]; [
new = [ "window"
"matching" "completion"
"disallow_fuzzy_matching" "sidePadding"
]; ]
} [
{ "window"
old = [ "completion"
"matching" "scrollbar"
"disallowFullfuzzyMatching" ]
]; [
new = [ "window"
"matching" "documentation"
"disallow_fullfuzzy_matching" "border"
]; ]
} [
{ "window"
old = [ "documentation"
"matching" "winhighlight"
"disallowPartialFuzzyMatching" ]
]; [
new = [ "window"
"matching" "documentation"
"disallow_partial_fuzzy_matching" "zindex"
]; ]
} [
{ "window"
old = [ "documentation"
"matching" "maxWidth"
"disallowPartialMatching" ]
]; [
new = [ "window"
"matching" "documentation"
"disallow_partial_matching" "maxHeight"
]; ]
} "experimental"
{
old = [
"matching"
"disallowPrefixUnmatching"
];
new = [
"matching"
"disallow_prefix_unmatching"
];
}
{
old = [
"sorting"
"priorityWeight"
];
new = [
"sorting"
"priority_weight"
];
}
{
old = [
"view"
"entries"
];
}
{
old = [
"view"
"docs"
"autoOpen"
];
new = [
"view"
"docs"
"auto_open"
];
}
{
old = [
"window"
"completion"
"border"
];
}
{
old = [
"window"
"completion"
"winhighlight"
];
}
{
old = [
"window"
"completion"
"zindex"
];
}
{
old = [
"window"
"completion"
"scrolloff"
];
}
{
old = [
"window"
"completion"
"colOffset"
];
new = [
"window"
"completion"
"col_offset"
];
}
{
old = [
"window"
"completion"
"sidePadding"
];
new = [
"window"
"completion"
"side_padding"
];
}
{
old = [
"window"
"completion"
"scrollbar"
];
}
{
old = [
"window"
"documentation"
"border"
];
}
{
old = [
"window"
"documentation"
"winhighlight"
];
}
{
old = [
"window"
"documentation"
"zindex"
];
}
{
old = [
"window"
"documentation"
"maxWidth"
];
new = [
"window"
"documentation"
"max_width"
];
}
{
old = [
"window"
"documentation"
"maxHeight"
];
new = [
"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"
{
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 = settingsOptions =
let let

View file

@ -22,60 +22,53 @@ 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"
"commentStyle"
"functionStyle"
"keywordStyle"
"statementStyle"
"typeStyle"
"transparent"
"dimInactive"
"terminalColors"
[
"colors"
"palette"
]
[
"colors"
"theme"
]
"theme"
[
"background"
"dark"
]
[
"background"
"light"
]
];
imports = [
(lib.mkRemovedOptionModule
[
"colorschemes" "colorschemes"
"kanagawa" "kanagawa"
]; "overrides"
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"
]
] ]
) ''
++ [
(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 = {
compile = defaultNullOpts.mkBool false '' compile = defaultNullOpts.mkBool false ''

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 = {