Merge pull request #179 from NotAShelf/inherit-lib

treewide: move from 'with lib' to 'inherit (lib) ...'
This commit is contained in:
NotAShelf 2023-11-07 13:51:07 +03:00 committed by GitHub
commit c4a2a6dcfc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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 = {