treewide: move from 'with lib' to 'inherit (lib) ...'

This commit is contained in:
Frothy 2023-11-06 17:50:27 -07:00
commit ffa25c8c8a
90 changed files with 281 additions and 273 deletions

View file

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; {
}: let
inherit (lib) mkEnableOption;
in {
options.vim.binds.cheatsheet = {
enable = mkEnableOption "cheatsheet-nvim: searchable cheatsheet for nvim using telescope";
};

View file

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; let
}: let
inherit (lib) mkIf nvim;
cfg = config.vim.binds.cheatsheet;
in {
config = mkIf (cfg.enable) {

View file

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; let
}: let
inherit (lib) mkIf nvim;
cfg = config.vim.binds.whichKey;
in {
config = mkIf (cfg.enable) {

View file

@ -1,6 +1,6 @@
{lib, ...}:
with lib;
with builtins; {
{lib, ...}: let
inherit (lib) mkEnableOption;
in {
options.vim.binds.whichKey = {
enable = mkEnableOption "which-key keybind helper menu";
};

View file

@ -1,6 +1,6 @@
{lib, ...}:
with lib;
with builtins; {
{lib, ...}: let
inherit (lib) mkEnableOption mkMappingOption;
in {
options.vim.utility.ccc = {
enable = mkEnableOption "ccc color picker for neovim";

View file

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; let
}: let
inherit (lib) addDescriptionsToMappings mkIf nvim;
cfg = config.vim.utility.ccc;
self = import ./ccc.nix {inherit lib;};

View file

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; let
}: let
inherit (lib) mkIf nvim;
cfg = config.vim.utility.diffview-nvim;
in {
config = mkIf (cfg.enable) {

View file

@ -1,6 +1,6 @@
{lib, ...}:
with lib;
with builtins; {
{lib, ...}: let
inherit (lib) mkEnableOption;
in {
options.vim.utility.diffview-nvim = {
enable = mkEnableOption "diffview-nvim: cycle through diffs for all modified files for any git rev";
};

View file

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; let
}: let
inherit (lib) addDescriptionsToMappings mkIf mkMerge mkSetLuaBinding nvim;
cfg = config.vim.gestures.gesture-nvim;
self = import ./gesture-nvim.nix {inherit lib;};

View file

@ -1,5 +1,6 @@
{lib, ...}:
with lib; {
{lib, ...}: let
inherit (lib) mkEnableOption mkMappingOption;
in {
options.vim.gestures.gesture-nvim = {
enable = mkEnableOption "gesture-nvim: mouse gestures";

View file

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; let
}: let
inherit (lib) mkIf nvim;
cfg = config.vim.utility.icon-picker;
in {
config = mkIf (cfg.enable) {

View file

@ -1,6 +1,6 @@
{lib, ...}:
with lib;
with builtins; {
{lib, ...}: let
inherit (lib) mkEnableOption;
in {
options.vim.utility.icon-picker = {
enable = mkEnableOption "nerdfonts icon picker for nvim";
};

View file

@ -2,8 +2,9 @@
config,
lib,
...
}:
with lib; let
}: let
inherit (lib) addDescriptionsToMappings mkIf mkSetBinding nvim;
cfg = config.vim.utility.motion.hop;
self = import ./hop.nix {inherit lib;};

View file

@ -1,5 +1,6 @@
{lib, ...}:
with lib; {
{lib, ...}: let
inherit (lib) mkMappingOption mkEnableOption;
in {
options.vim.utility.motion.hop = {
mappings = {
hop = mkMappingOption "Jump to occurences [hop.nvim]" "<leader>h";

View file

@ -2,8 +2,9 @@
config,
lib,
...
}:
with lib; let
}: let
inherit (lib) mkIf mkMerge mkBinding nvim;
cfg = config.vim.utility.motion.leap;
in {
config = mkIf cfg.enable {

View file

@ -1,6 +1,6 @@
{lib, ...}:
with lib;
with builtins; {
{lib, ...}: let
inherit (lib) mkEnableOption mkOption types;
in {
options.vim.utility.motion.leap = {
enable = mkEnableOption "leap.nvim plugin (easy motion)";

View file

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; let
}: let
inherit (lib) addDescriptionsToMappings mkIf mkMerge mkSetBinding nvim;
cfg = config.vim.utility.surround;
self = import ./surround.nix {inherit lib config;};
mappingDefinitions = self.options.vim.utility.surround.mappings;

View file

@ -2,9 +2,9 @@
lib,
config,
...
}:
with lib;
with builtins; {
}: let
inherit (lib) mkOption types mkIf mkDefault;
in {
options.vim.utility.surround = {
enable = mkOption {
type = types.bool;

View file

@ -3,9 +3,9 @@
config,
lib,
...
}:
with lib;
with builtins; let
}: let
inherit (lib) addDescriptionsToMappings mkIf mkMerge mkSetBinding nvim;
cfg = config.vim.telescope;
self = import ./telescope.nix {inherit lib;};
mappingDefinitions = self.options.vim.telescope.mappings;

View file

@ -1,6 +1,6 @@
{lib, ...}:
with lib;
with builtins; {
{lib, ...}: let
inherit (lib) mkMappingOption mkEnableOption;
in {
options.vim.telescope = {
mappings = {
findProjects = mkMappingOption "Find files [Telescope]" "<leader>fp";

View file

@ -3,9 +3,9 @@
lib,
pkgs,
...
}:
with lib;
with builtins; let
}: let
inherit (lib) mkIf nvim;
cfg = config.vim.utility.vim-wakatime;
in {
config = mkIf (cfg.enable) {

View file

@ -2,9 +2,9 @@
lib,
pkgs,
...
}:
with lib;
with builtins; {
}: let
inherit (lib) mkEnableOption mkOption types;
in {
options.vim.utility.vim-wakatime = {
enable = mkEnableOption "vim-wakatime: live code statistics";