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

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

View File

@ -3,9 +3,9 @@
config,
lib,
...
}:
with lib;
with builtins; let
}: let
inherit (lib) mkIf nvim mkLuaBinding mkMerge;
cfg = config.vim.assistant.copilot;
wrapPanelBinding = luaFunction: key: ''

View File

@ -3,9 +3,9 @@
config,
lib,
...
}:
with lib;
with builtins; let
}: let
inherit (lib) mkEnableOption mkOption types;
cfg = config.vim.assistant.copilot;
in {
options.vim.assistant.copilot = {

View File

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; let
}: let
inherit (lib) mkIf mkMerge mkExprBinding boolToString nvim;
cfg = config.vim.assistant.tabnine;
in {
config = mkIf cfg.enable {

View File

@ -1,6 +1,6 @@
{lib, ...}:
with lib;
with builtins; {
{lib, ...}: let
inherit (lib) mkEnableOption mkOption types mkMappingOption;
in {
options.vim.assistant.tabnine = {
enable = mkEnableOption "Tabnine assistant";

View File

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

View File

@ -1,6 +1,6 @@
{lib, ...}:
with lib;
with builtins; {
{lib, ...}: let
inherit (lib) mkEnableOption mkOption types;
in {
options.vim = {
autopairs = {
enable = mkEnableOption "autopairs" // {default = false;};

View File

@ -1,6 +1,6 @@
{lib, ...}:
with lib;
with builtins; {
{lib, ...}: let
inherit (lib) mkEnableOption mkMappingOption;
in {
options.vim.comments.comment-nvim = {
enable = mkEnableOption "smart and powerful comment plugin for neovim comment-nvim";

View File

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; let
}: let
inherit (lib) mkIf mkMerge mkExprBinding mkBinding nvim;
cfg = config.vim.comments.comment-nvim;
self = import ./comment-nvim.nix {
inherit lib;

View File

@ -2,9 +2,9 @@
lib,
config,
...
}:
with lib;
with builtins; let
}: let
inherit (lib) addDescriptionsToMappings concatMapStringsSep attrNames concatStringsSep mapAttrsToList nvim mkIf mkSetLuaBinding mkMerge optionalString;
cfg = config.vim.autocomplete;
lspkindEnabled = config.vim.lsp.enable && config.vim.lsp.lspkind.enable;

View File

@ -1,6 +1,6 @@
{lib, ...}:
with lib;
with builtins; {
{lib, ...}: let
inherit (lib) mkEnableOption mkMappingOption mkOption types;
in {
options.vim = {
autocomplete = {
enable = mkEnableOption "enable autocomplete" // {default = false;};

View File

@ -7,6 +7,7 @@ with builtins; let
inherit (lib) mkOption types mapAttrsFlatten filterAttrs optionalString getAttrs literalExpression;
inherit (lib) nvim;
inherit (nvim.lua) toLuaObject;
inherit (nvim.vim) valToVim;
cfg = config.vim;

View File

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; {
}: let
inherit (lib) mkEnableOption;
in {
options.vim.dashboard.alpha = {
enable = mkEnableOption "dashboard via alpha.nvim";
};

View File

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; let
}: let
inherit (lib) mkIf nvim;
cfg = config.vim.dashboard.alpha;
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.dashboard.dashboard-nvim;
in {
config = mkIf cfg.enable {

View File

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; {
}: let
inherit (lib) mkEnableOption;
in {
options.vim.dashboard.dashboard-nvim = {
enable = mkEnableOption "dashboard via dashboard.nvim";
};

View File

@ -3,9 +3,9 @@
config,
lib,
...
}:
with builtins;
with lib; let
}: let
inherit (lib) mkIf;
cfg = config.vim.dashboard.startify;
mkVimBool = val:

View File

@ -2,9 +2,9 @@
config,
lib,
...
}:
with builtins;
with lib; {
}: let
inherit (lib) mkEnableOption mkOption types;
in {
options.vim.dashboard.startify = {
enable = mkEnableOption "dashboard via vim-startify";

View File

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

View File

@ -1,5 +1,6 @@
{lib, ...}:
with lib; {
{lib, ...}: let
inherit (lib) mkEnableOption mkOption types mkMappingOption;
in {
options.vim.debugger.nvim-dap = {
enable = mkEnableOption "debugging via nvim-dap";

View File

@ -3,9 +3,9 @@
lib,
pkgs,
...
}:
with lib;
with builtins; let
}: let
inherit (lib) mkIf mkMerge mkBinding nvim boolToString;
cfg = config.vim.filetree.nvimTree;
self = import ./nvimtree.nix {
inherit pkgs;

View File

@ -2,9 +2,9 @@
pkgs,
lib,
...
}:
with lib;
with builtins; {
}: let
inherit (lib) mkEnableOption mkOption types literalExpression;
in {
options.vim.filetree.nvimTree = {
enable = mkEnableOption "filetree via nvim-tree.lua";

View File

@ -2,9 +2,8 @@
config,
lib,
...
}:
with lib;
with builtins; let
}: let
inherit (lib) addDescriptionsToMappings mkIf mkMerge mkSetExprBinding toJSON mkSetLuaBinding nvim;
cfg = config.vim.git;
self = import ./git.nix {inherit lib;};
@ -20,7 +19,7 @@ in {
vim.maps.normal = mkMerge [
(mkSetExprBinding gsMappings.nextHunk ''
function()
if vim.wo.diff then return ${toJSON gsMappings.nextHunk.value} end
if vim.wo.diff then return ${builtins.toJSON gsMappings.nextHunk.value} end
vim.schedule(function() package.loaded.gitsigns.next_hunk() end)
@ -29,7 +28,7 @@ in {
'')
(mkSetExprBinding gsMappings.previousHunk ''
function()
if vim.wo.diff then return ${toJSON gsMappings.previousHunk.value} end
if vim.wo.diff then return ${builtins.toJSON gsMappings.previousHunk.value} end
vim.schedule(function() package.loaded.gitsigns.prev_hunk() end)

View File

@ -1,6 +1,6 @@
{lib, ...}:
with lib;
with builtins; {
{lib, ...}: let
inherit (lib) mkEnableOption mkMappingOption;
in {
options.vim.git = {
enable = mkEnableOption "git tools via gitsigns";

View File

@ -1,5 +1,6 @@
{lib, ...}:
with lib; {
{lib, ...}: let
inherit (lib) mkEnableOption mkMappingOption;
in {
options.vim.minimap.codewindow = {
enable = mkEnableOption "codewindow plugin for minimap view";

View File

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

View File

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

View File

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; {
}: let
inherit (lib) mkEnableOption;
in {
options.vim.minimap.minimap-vim = {
enable = mkEnableOption "minimap-vim plugin for minimap view";
};

View File

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

View File

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; {
}: let
inherit (lib) mkEnableOption;
in {
options.vim.notes.mind-nvim = {
enable = mkEnableOption "organizer tool for Neovim.";
};

View File

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; let
}: let
inherit (lib) mkIf nvim;
cfg = config.vim.notes.obsidian;
auto = config.vim.autocomplete;
in {

View File

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; {
}: let
inherit (lib) mkEnableOption mkOption types;
in {
options.vim.notes = {
obsidian = {
enable = mkEnableOption "complementary neovim plugins for Obsidian editor";

View File

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

View File

@ -3,9 +3,9 @@
lib,
pkgs,
...
}:
with lib;
with builtins; {
}: let
inherit (lib) mkEnableOption types mkOption nvim;
in {
options.vim.notes.orgmode = {
enable = mkEnableOption "nvim-orgmode: Neovim plugin for Emac Orgmode. Get the best of both worlds";

View File

@ -3,9 +3,9 @@
config,
lib,
...
}:
with lib;
with builtins; let
}: let
inherit (lib) mkMerge mkBinding mkIf;
cfg = config.vim.notes.todo-comments;
self = import ./todo-comments.nix {inherit lib;};
mappings = self.options.vim.notes.todo-comments.mappings;

View File

@ -1,6 +1,6 @@
{lib, ...}:
with lib;
with builtins; {
{lib, ...}: let
inherit (lib) mkEnableOption mkOption types mkMappingOption;
in {
options.vim.notes.todo-comments = {
enable = mkEnableOption "todo-comments: highlight and search for todo comments like TODO, HACK, BUG in your code base";

View File

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

View File

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; {
}: let
inherit (lib) mkEnableOption mkOption types;
in {
options.vim.projects.project-nvim = {
enable = mkEnableOption "project-nvim for project management";

View File

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

View File

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; {
}: let
inherit (lib) mkEnableOption mkOption types;
in {
options.vim.presence.presence-nvim = {
enable = mkEnableOption "presence.nvim plugin for discord rich presence";

View File

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; let
}: let
inherit (lib) mkIf optionals mkMerge mkBinding nvim concatStringsSep boolToString;
cfg = config.vim.session.nvim-session-manager;
in {
config = mkIf cfg.enable {

View File

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; {
}: let
inherit (lib) mkEnableOption mkOption types;
in {
options.vim.session.nvim-session-manager = {
enable = mkEnableOption "nvim-session-manager: manage sessions like folders in VSCode";

View File

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

View File

@ -1,5 +1,6 @@
{lib, ...}:
with lib; {
{lib, ...}: let
inherit (lib) mkEnableOption;
in {
options.vim.snippets.vsnip = {
enable = mkEnableOption "vim-vsnip: snippet LSP/VSCode's format";
};

View File

@ -2,10 +2,9 @@
config,
lib,
...
}:
with lib; let
}: let
cfg = config.vim.statusline.lualine;
inherit (nvim.lua) luaTable;
inherit (lib) mkIf nvim boolToString optionalString;
in {
config = (mkIf cfg.enable) {
vim.startPlugins = [
@ -33,21 +32,21 @@ in {
},
-- active sections
sections = {
lualine_a = ${luaTable (cfg.activeSection.a ++ cfg.extraActiveSection.a)},
lualine_b = ${luaTable (cfg.activeSection.b ++ cfg.extraActiveSection.b)},
lualine_c = ${luaTable (cfg.activeSection.c ++ cfg.extraActiveSection.c)},
lualine_x = ${luaTable (cfg.activeSection.x ++ cfg.extraActiveSection.x)},
lualine_y = ${luaTable (cfg.activeSection.y ++ cfg.extraActiveSection.y)},
lualine_z = ${luaTable (cfg.activeSection.z ++ cfg.extraActiveSection.z)},
lualine_a = ${nvim.lua.luaTable (cfg.activeSection.a ++ cfg.extraActiveSection.a)},
lualine_b = ${nvim.lua.luaTable (cfg.activeSection.b ++ cfg.extraActiveSection.b)},
lualine_c = ${nvim.lua.luaTable (cfg.activeSection.c ++ cfg.extraActiveSection.c)},
lualine_x = ${nvim.lua.luaTable (cfg.activeSection.x ++ cfg.extraActiveSection.x)},
lualine_y = ${nvim.lua.luaTable (cfg.activeSection.y ++ cfg.extraActiveSection.y)},
lualine_z = ${nvim.lua.luaTable (cfg.activeSection.z ++ cfg.extraActiveSection.z)},
},
--
inactive_sections = {
lualine_a = ${luaTable (cfg.inactiveSection.a ++ cfg.extraInactiveSection.a)},
lualine_b = ${luaTable (cfg.inactiveSection.b ++ cfg.extraInactiveSection.b)},
lualine_c = ${luaTable (cfg.inactiveSection.c ++ cfg.extraInactiveSection.c)},
lualine_x = ${luaTable (cfg.inactiveSection.x ++ cfg.extraInactiveSection.x)},
lualine_y = ${luaTable (cfg.inactiveSection.y ++ cfg.extraInactiveSection.y)},
lualine_z = ${luaTable (cfg.inactiveSection.z ++ cfg.extraInactiveSection.z)},
lualine_a = ${nvim.lua.luaTable (cfg.inactiveSection.a ++ cfg.extraInactiveSection.a)},
lualine_b = ${nvim.lua.luaTable (cfg.inactiveSection.b ++ cfg.extraInactiveSection.b)},
lualine_c = ${nvim.lua.luaTable (cfg.inactiveSection.c ++ cfg.extraInactiveSection.c)},
lualine_x = ${nvim.lua.luaTable (cfg.inactiveSection.x ++ cfg.extraInactiveSection.x)},
lualine_y = ${nvim.lua.luaTable (cfg.inactiveSection.y ++ cfg.extraInactiveSection.y)},
lualine_z = ${nvim.lua.luaTable (cfg.inactiveSection.z ++ cfg.extraInactiveSection.z)},
},
tabline = {},

View File

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; let
}: let
inherit (lib) mkEnableOption mkOption types elem optional;
supported_themes = import ./supported_themes.nix;
colorPuccin =
if config.vim.statusline.lualine.theme == "catppuccin"

View File

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; let
}: let
inherit (lib) mkIf mkMerge mkLuaBinding mkBinding nvim;
cfg = config.vim.tabline.nvimBufferline;
self = import ./nvim-bufferline.nix {
inherit lib;

View File

@ -1,6 +1,6 @@
{lib, ...}:
with lib;
with builtins; {
{lib, ...}: let
inherit (lib) mkEnableOption mkMappingOption;
in {
options.vim.tabline.nvimBufferline = {
enable = mkEnableOption "nvim-bufferline-lua as a bufferline";

View File

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; let
}: let
inherit (lib) mkMerge mkIf mkBinding nvim getExe;
cfg = config.vim.terminal.toggleterm;
in {
config = mkMerge [
@ -59,7 +59,7 @@ in {
end
})
vim.keymap.set('n', ${toJSON cfg.lazygit.mappings.open}, function() lazygit:toggle() end, {silent = true, noremap = true, desc = 'Open lazygit [toggleterm]'})
vim.keymap.set('n', ${builtins.toJSON cfg.lazygit.mappings.open}, function() lazygit:toggle() end, {silent = true, noremap = true, desc = 'Open lazygit [toggleterm]'})
'';
}
)

View File

@ -3,9 +3,9 @@
config,
lib,
...
}:
with lib;
with builtins; {
}: let
inherit (lib) mkEnableOption mkOption types mkMappingOption;
in {
options.vim.terminal.toggleterm = {
enable = mkEnableOption "toggleterm as a replacement to built-in terminal command";
mappings = {

View File

@ -2,8 +2,9 @@
config,
lib,
...
}:
with lib; {
}: let
inherit (lib) mkDefault;
in {
config = {
vim.theme = {
enable = mkDefault false;

View File

@ -2,10 +2,9 @@
config,
lib,
...
}:
with lib;
with lib.attrsets;
with builtins; let
}: let
inherit (lib) mkOption types attrNames mkIf nvim;
cfg = config.vim.theme;
supported_themes = import ./supported_themes.nix {inherit lib;};
in {

View File

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; let
}: let
inherit (lib) addDescriptionsToMappings mkIf optional mkSetBinding mkMerge nvim;
cfg = config.vim.treesitter;
usingNvimCmp = config.vim.autocomplete.enable && config.vim.autocomplete.type == "nvim-cmp";

View File

@ -3,9 +3,9 @@
config,
lib,
...
}:
with lib;
with builtins; let
}: let
inherit (lib) mkEnableOption mkOption types mkIf nvim boolToString;
treesitter = config.vim.treesitter;
cfg = treesitter.context;
in {

View File

@ -1,5 +1,6 @@
{lib, ...}:
with lib; {
{lib, ...}: let
inherit (lib) mkEnableOption mkMappingOption mkOption types;
in {
options.vim.treesitter = {
enable = mkEnableOption "treesitter, also enabled automatically through language options";

View File

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; {
}: let
inherit (lib) mkEnableOption mkOption types;
in {
options.vim.ui.colorizer = {
enable = mkEnableOption "nvim-colorizer.lua for color highlighting";

View File

@ -3,9 +3,9 @@
config,
lib,
...
}:
with lib;
with builtins; let
}: let
inherit (lib) mkIf nvim boolToString;
cfg = config.vim.ui.colorizer;
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.ui.illuminate;
in {
config = mkIf cfg.enable {

View File

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; {
}: let
inherit (lib) mkEnableOption;
in {
options.vim.ui.illuminate = {
enable = mkEnableOption "vim-illuminate: automatically highlight other uses of the word under the cursor";
};

View File

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; let
}: let
inherit (lib) mkIf nvim boolToString;
cfg = config.vim.ui.modes-nvim;
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.ui.modes-nvim = {
enable = mkEnableOption "modes.nvim's prismatic line decorations";

View File

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

View File

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; {
}: let
inherit (lib) mkEnableOption;
in {
options.vim.ui.noice = {
enable = mkEnableOption "noice-nvim UI modification library";
};

View File

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

View File

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; {
}: let
inherit (lib) mkEnableOption mkOption types;
in {
options.vim.notify.nvim-notify = {
enable = mkEnableOption "nvim-notify notifications";
stages = mkOption {

View File

@ -3,9 +3,9 @@
config,
lib,
...
}:
with lib;
with builtins; let
}: let
inherit (lib) mkIf nvim concatStringsSep;
cfg = config.vim.ui.smartcolumn;
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.ui.smartcolumn = {
enable = mkEnableOption "line length indicator";

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";

View File

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

View File

@ -2,9 +2,9 @@
config,
lib,
...
}:
with lib;
with builtins; let
}: let
inherit (lib) mkEnableOption mkMappingOption mkOption types literalExpression;
cfg = config.vim.visuals;
in {
options.vim.visuals = {