mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-04-09 03:56:11 +00:00
plugins: use mkMappingOption instead of mkOption where possible
This commit is contained in:
parent
f040b4a943
commit
5e1ee37e7f
9 changed files with 113 additions and 411 deletions
|
|
@ -1,13 +1,15 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption mkOption literalExpression;
|
||||
inherit (lib.generators) mkLuaInline;
|
||||
inherit (lib.types) nullOr str bool int submodule listOf enum oneOf attrs addCheck;
|
||||
inherit (lib.types) str bool int submodule listOf enum oneOf attrs addCheck;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
inherit (lib.nvim.config) batchRenameOptions;
|
||||
inherit (config.vim.lib) mkMappingOption;
|
||||
|
||||
migrationTable = {
|
||||
disableNetrw = "disable_netrw";
|
||||
|
|
@ -76,26 +78,10 @@ in {
|
|||
enable = mkEnableOption "filetree via nvim-tree.lua";
|
||||
|
||||
mappings = {
|
||||
toggle = mkOption {
|
||||
type = nullOr str;
|
||||
default = "<leader>t";
|
||||
description = "Toggle NvimTree";
|
||||
};
|
||||
refresh = mkOption {
|
||||
type = nullOr str;
|
||||
default = "<leader>tr";
|
||||
description = "Refresh NvimTree";
|
||||
};
|
||||
findFile = mkOption {
|
||||
type = nullOr str;
|
||||
default = "<leader>tg";
|
||||
description = "Find file in NvimTree";
|
||||
};
|
||||
focus = mkOption {
|
||||
type = nullOr str;
|
||||
default = "<leader>tf";
|
||||
description = "Focus NvimTree";
|
||||
};
|
||||
toggle = mkMappingOption "Toggle NvimTree" "<leader>t";
|
||||
refresh = mkMappingOption "Refresh NvimTree" "<leader>tr";
|
||||
findFile = mkMappingOption "Find file in NvimTree" "<leader>tg";
|
||||
focus = mkMappingOption "Focus NvimTree" "<leader>tf";
|
||||
};
|
||||
|
||||
setupOpts = mkPluginSetupOption "Nvim Tree" {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue