mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-09 16:54:36 +02:00
plugins/*: use new mkSettingsRenamedOptionModules
This commit is contained in:
parent
0ddf6e39ac
commit
c179d47d3d
37 changed files with 1176 additions and 1510 deletions
|
@ -28,26 +28,21 @@ lib.nixvim.neovim-plugin.mkNeovimPlugin {
|
|||
"triggerEvents"
|
||||
"writeAllBuffers"
|
||||
"debounceDelay"
|
||||
{
|
||||
old = "enableAutoSave";
|
||||
new = "enabled";
|
||||
}
|
||||
];
|
||||
|
||||
imports =
|
||||
let
|
||||
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
|
||||
imports = [
|
||||
(lib.mkRemovedOptionModule [ "plugins" "auto-save" "keymaps" ] ''
|
||||
Use the top-level `keymaps` option to create a keymap that runs :ASToggle
|
||||
|
||||
keymaps = [
|
||||
{ key = "<leader>s"; action = "<cmd>ASToggle<CR>"; }
|
||||
];
|
||||
'')
|
||||
];
|
||||
keymaps = [
|
||||
{ key = "<leader>s"; action = "<cmd>ASToggle<CR>"; }
|
||||
];
|
||||
'')
|
||||
];
|
||||
|
||||
settingsOptions = {
|
||||
enabled = defaultNullOpts.mkBool true ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue