mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 10:21:31 +00:00
treewide: make lib calls explicit
This commit is contained in:
parent
a7531186a8
commit
974bfcc78e
56 changed files with 589 additions and 496 deletions
|
@ -3,7 +3,9 @@
|
|||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) addDescriptionsToMappings mkIf mkMerge mkSetBinding nvim;
|
||||
inherit (lib.modules) mkIf mkMerge;
|
||||
inherit (lib.nvim.binds) addDescriptionsToMappings mkSetBinding;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
|
||||
cfg = config.vim.utility.surround;
|
||||
self = import ./surround.nix {inherit lib config;};
|
||||
|
@ -16,7 +18,7 @@ in {
|
|||
"nvim-surround"
|
||||
];
|
||||
|
||||
luaConfigRC.surround = nvim.dag.entryAnywhere ''
|
||||
luaConfigRC.surround = entryAnywhere ''
|
||||
require('nvim-surround').setup()
|
||||
'';
|
||||
|
||||
|
|
|
@ -3,67 +3,69 @@
|
|||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkOption types mkIf mkDefault;
|
||||
inherit (lib.modules) mkIf mkDefault;
|
||||
inherit (lib.options) mkOption;
|
||||
inherit (lib.types) bool nullOr str;
|
||||
in {
|
||||
options.vim.utility.surround = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
type = bool;
|
||||
default = false;
|
||||
description = "nvim-surround: add/change/delete surrounding delimiter pairs with ease. Note that the default mappings deviate from upstreeam to avoid conflicts with nvim-leap.";
|
||||
};
|
||||
useVendoredKeybindings = mkOption {
|
||||
type = types.bool;
|
||||
type = bool;
|
||||
default = true;
|
||||
description = "Use alternative set of keybindings that avoids conflicts with other popular plugins, e.g. nvim-leap";
|
||||
};
|
||||
mappings = {
|
||||
insert = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
type = nullOr str;
|
||||
default = "<C-g>z";
|
||||
description = "Add surround character around the cursor";
|
||||
};
|
||||
insertLine = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
type = nullOr str;
|
||||
default = "<C-g>Z";
|
||||
description = "Add surround character around the cursor on new lines";
|
||||
};
|
||||
normal = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
type = nullOr str;
|
||||
default = "gz";
|
||||
description = "Surround motion with character";
|
||||
};
|
||||
normalCur = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
type = nullOr str;
|
||||
default = "gZ";
|
||||
description = "Surround motion with character on new lines";
|
||||
};
|
||||
normalLine = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
type = nullOr str;
|
||||
default = "gzz";
|
||||
description = "Surround line with character";
|
||||
};
|
||||
normalCurLine = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
type = nullOr str;
|
||||
default = "gZZ";
|
||||
description = "Surround line with character on new lines";
|
||||
};
|
||||
visual = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
type = nullOr str;
|
||||
default = "gz";
|
||||
description = "Surround selection with character";
|
||||
};
|
||||
visualLine = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
type = nullOr str;
|
||||
default = "gZ";
|
||||
description = "Surround selection with character on new lines";
|
||||
};
|
||||
delete = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
type = nullOr str;
|
||||
default = "gzd";
|
||||
description = "Delete surrounding character";
|
||||
};
|
||||
change = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
type = nullOr str;
|
||||
default = "gzr";
|
||||
description = "Change surrounding character";
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue