treewide: make lib calls explicit

This commit is contained in:
Frothy 2024-03-23 20:14:39 -04:00
commit 974bfcc78e
56 changed files with 589 additions and 496 deletions

View file

@ -3,7 +3,9 @@
lib,
...
}: let
inherit (lib) addDescriptionsToMappings mkIf mkSetBinding nvim;
inherit (lib.modules) mkIf;
inherit (lib.nvim.binds) addDescriptionsToMappings mkSetBinding;
inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.utility.motion.hop;
@ -17,7 +19,7 @@ in {
vim.maps.normal = mkSetBinding mappings.hop "<cmd> HopPattern<CR>";
vim.luaConfigRC.hop-nvim = nvim.dag.entryAnywhere ''
vim.luaConfigRC.hop-nvim = entryAnywhere ''
require('hop').setup()
'';
};

View file

@ -1,5 +1,6 @@
{lib, ...}: let
inherit (lib) mkMappingOption mkEnableOption;
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.binds) mkMappingOption;
in {
options.vim.utility.motion.hop = {
mappings = {

View file

@ -3,7 +3,9 @@
lib,
...
}: let
inherit (lib) mkIf mkMerge mkBinding nvim;
inherit (lib.modules) mkIf mkMerge;
inherit (lib.nvim.binds) mkBinding;
inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.utility.motion.leap;
in {
@ -35,7 +37,7 @@ in {
(mkBinding cfg.mappings.leapFromWindow "<Plug>(leap-from-window)" "Leap from window")
];
vim.luaConfigRC.leap-nvim = nvim.dag.entryAnywhere ''
vim.luaConfigRC.leap-nvim = entryAnywhere ''
require('leap').opts = {
max_phase_one_targets = nil,
highlight_unlabeled_phase_one_targets = false,

View file

@ -1,32 +1,33 @@
{lib, ...}: let
inherit (lib) mkEnableOption mkOption types;
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.types) nullOr str;
in {
options.vim.utility.motion.leap = {
enable = mkEnableOption "leap.nvim plugin (easy motion)";
mappings = {
leapForwardTo = mkOption {
type = types.nullOr types.str;
type = nullOr str;
description = "Leap forward to";
default = "s";
};
leapBackwardTo = mkOption {
type = types.nullOr types.str;
type = nullOr str;
description = "Leap backward to";
default = "S";
};
leapForwardTill = mkOption {
type = types.nullOr types.str;
type = nullOr str;
description = "Leap forward till";
default = "x";
};
leapBackwardTill = mkOption {
type = types.nullOr types.str;
type = nullOr str;
description = "Leap backward till";
default = "X";
};
leapFromWindow = mkOption {
type = types.nullOr types.str;
type = nullOr str;
description = "Leap from window";
default = "gs";
};