mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-01 19:11:15 +00:00
Merge pull request #179 from NotAShelf/inherit-lib
treewide: move from 'with lib' to 'inherit (lib) ...'
This commit is contained in:
commit
c4a2a6dcfc
90 changed files with 281 additions and 273 deletions
|
@ -3,9 +3,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkIf nvim mkLuaBinding mkMerge;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.assistant.copilot;
|
cfg = config.vim.assistant.copilot;
|
||||||
|
|
||||||
wrapPanelBinding = luaFunction: key: ''
|
wrapPanelBinding = luaFunction: key: ''
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption mkOption types;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.assistant.copilot;
|
cfg = config.vim.assistant.copilot;
|
||||||
in {
|
in {
|
||||||
options.vim.assistant.copilot = {
|
options.vim.assistant.copilot = {
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkIf mkMerge mkExprBinding boolToString nvim;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.assistant.tabnine;
|
cfg = config.vim.assistant.tabnine;
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{lib, ...}:
|
{lib, ...}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption mkOption types mkMappingOption;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.assistant.tabnine = {
|
options.vim.assistant.tabnine = {
|
||||||
enable = mkEnableOption "Tabnine assistant";
|
enable = mkEnableOption "Tabnine assistant";
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkIf nvim optionalString boolToString;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.autopairs;
|
cfg = config.vim.autopairs;
|
||||||
in {
|
in {
|
||||||
config =
|
config =
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{lib, ...}:
|
{lib, ...}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption mkOption types;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim = {
|
options.vim = {
|
||||||
autopairs = {
|
autopairs = {
|
||||||
enable = mkEnableOption "autopairs" // {default = false;};
|
enable = mkEnableOption "autopairs" // {default = false;};
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{lib, ...}:
|
{lib, ...}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption mkMappingOption;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.comments.comment-nvim = {
|
options.vim.comments.comment-nvim = {
|
||||||
enable = mkEnableOption "smart and powerful comment plugin for neovim comment-nvim";
|
enable = mkEnableOption "smart and powerful comment plugin for neovim comment-nvim";
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkIf mkMerge mkExprBinding mkBinding nvim;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.comments.comment-nvim;
|
cfg = config.vim.comments.comment-nvim;
|
||||||
self = import ./comment-nvim.nix {
|
self = import ./comment-nvim.nix {
|
||||||
inherit lib;
|
inherit lib;
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) addDescriptionsToMappings concatMapStringsSep attrNames concatStringsSep mapAttrsToList nvim mkIf mkSetLuaBinding mkMerge optionalString;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.autocomplete;
|
cfg = config.vim.autocomplete;
|
||||||
lspkindEnabled = config.vim.lsp.enable && config.vim.lsp.lspkind.enable;
|
lspkindEnabled = config.vim.lsp.enable && config.vim.lsp.lspkind.enable;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{lib, ...}:
|
{lib, ...}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption mkMappingOption mkOption types;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim = {
|
options.vim = {
|
||||||
autocomplete = {
|
autocomplete = {
|
||||||
enable = mkEnableOption "enable autocomplete" // {default = false;};
|
enable = mkEnableOption "enable autocomplete" // {default = false;};
|
||||||
|
|
|
@ -7,6 +7,7 @@ with builtins; let
|
||||||
inherit (lib) mkOption types mapAttrsFlatten filterAttrs optionalString getAttrs literalExpression;
|
inherit (lib) mkOption types mapAttrsFlatten filterAttrs optionalString getAttrs literalExpression;
|
||||||
inherit (lib) nvim;
|
inherit (lib) nvim;
|
||||||
inherit (nvim.lua) toLuaObject;
|
inherit (nvim.lua) toLuaObject;
|
||||||
|
inherit (nvim.vim) valToVim;
|
||||||
|
|
||||||
cfg = config.vim;
|
cfg = config.vim;
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.dashboard.alpha = {
|
options.vim.dashboard.alpha = {
|
||||||
enable = mkEnableOption "dashboard via alpha.nvim";
|
enable = mkEnableOption "dashboard via alpha.nvim";
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkIf nvim;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.dashboard.alpha;
|
cfg = config.vim.dashboard.alpha;
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkIf nvim;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.dashboard.dashboard-nvim;
|
cfg = config.vim.dashboard.dashboard-nvim;
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.dashboard.dashboard-nvim = {
|
options.vim.dashboard.dashboard-nvim = {
|
||||||
enable = mkEnableOption "dashboard via dashboard.nvim";
|
enable = mkEnableOption "dashboard via dashboard.nvim";
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with builtins;
|
inherit (lib) mkIf;
|
||||||
with lib; let
|
|
||||||
cfg = config.vim.dashboard.startify;
|
cfg = config.vim.dashboard.startify;
|
||||||
|
|
||||||
mkVimBool = val:
|
mkVimBool = val:
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with builtins;
|
inherit (lib) mkEnableOption mkOption types;
|
||||||
with lib; {
|
in {
|
||||||
options.vim.dashboard.startify = {
|
options.vim.dashboard.startify = {
|
||||||
enable = mkEnableOption "dashboard via vim-startify";
|
enable = mkEnableOption "dashboard via vim-startify";
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) addDescriptionsToMappings mkMerge mkIf mapAttrs nvim mkSetLuaBinding optionalString;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.debugger.nvim-dap;
|
cfg = config.vim.debugger.nvim-dap;
|
||||||
self = import ./nvim-dap.nix {
|
self = import ./nvim-dap.nix {
|
||||||
inherit lib;
|
inherit lib;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{lib, ...}:
|
{lib, ...}: let
|
||||||
with lib; {
|
inherit (lib) mkEnableOption mkOption types mkMappingOption;
|
||||||
|
in {
|
||||||
options.vim.debugger.nvim-dap = {
|
options.vim.debugger.nvim-dap = {
|
||||||
enable = mkEnableOption "debugging via nvim-dap";
|
enable = mkEnableOption "debugging via nvim-dap";
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkIf mkMerge mkBinding nvim boolToString;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.filetree.nvimTree;
|
cfg = config.vim.filetree.nvimTree;
|
||||||
self = import ./nvimtree.nix {
|
self = import ./nvimtree.nix {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption mkOption types literalExpression;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.filetree.nvimTree = {
|
options.vim.filetree.nvimTree = {
|
||||||
enable = mkEnableOption "filetree via nvim-tree.lua";
|
enable = mkEnableOption "filetree via nvim-tree.lua";
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,8 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) addDescriptionsToMappings mkIf mkMerge mkSetExprBinding toJSON mkSetLuaBinding nvim;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.git;
|
cfg = config.vim.git;
|
||||||
|
|
||||||
self = import ./git.nix {inherit lib;};
|
self = import ./git.nix {inherit lib;};
|
||||||
|
@ -20,7 +19,7 @@ in {
|
||||||
vim.maps.normal = mkMerge [
|
vim.maps.normal = mkMerge [
|
||||||
(mkSetExprBinding gsMappings.nextHunk ''
|
(mkSetExprBinding gsMappings.nextHunk ''
|
||||||
function()
|
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)
|
vim.schedule(function() package.loaded.gitsigns.next_hunk() end)
|
||||||
|
|
||||||
|
@ -29,7 +28,7 @@ in {
|
||||||
'')
|
'')
|
||||||
(mkSetExprBinding gsMappings.previousHunk ''
|
(mkSetExprBinding gsMappings.previousHunk ''
|
||||||
function()
|
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)
|
vim.schedule(function() package.loaded.gitsigns.prev_hunk() end)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{lib, ...}:
|
{lib, ...}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption mkMappingOption;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.git = {
|
options.vim.git = {
|
||||||
enable = mkEnableOption "git tools via gitsigns";
|
enable = mkEnableOption "git tools via gitsigns";
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{lib, ...}:
|
{lib, ...}: let
|
||||||
with lib; {
|
inherit (lib) mkEnableOption mkMappingOption;
|
||||||
|
in {
|
||||||
options.vim.minimap.codewindow = {
|
options.vim.minimap.codewindow = {
|
||||||
enable = mkEnableOption "codewindow plugin for minimap view";
|
enable = mkEnableOption "codewindow plugin for minimap view";
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) addDescriptionsToMappings mkIf mkMerge mkSetLuaBinding nvim;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.minimap.codewindow;
|
cfg = config.vim.minimap.codewindow;
|
||||||
|
|
||||||
self = import ./codewindow.nix {inherit lib;};
|
self = import ./codewindow.nix {inherit lib;};
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkIf;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.minimap.minimap-vim;
|
cfg = config.vim.minimap.minimap-vim;
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.minimap.minimap-vim = {
|
options.vim.minimap.minimap-vim = {
|
||||||
enable = mkEnableOption "minimap-vim plugin for minimap view";
|
enable = mkEnableOption "minimap-vim plugin for minimap view";
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkIf nvim;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.notes.mind-nvim;
|
cfg = config.vim.notes.mind-nvim;
|
||||||
in {
|
in {
|
||||||
config = mkIf (cfg.enable) {
|
config = mkIf (cfg.enable) {
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.notes.mind-nvim = {
|
options.vim.notes.mind-nvim = {
|
||||||
enable = mkEnableOption "organizer tool for Neovim.";
|
enable = mkEnableOption "organizer tool for Neovim.";
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkIf nvim;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.notes.obsidian;
|
cfg = config.vim.notes.obsidian;
|
||||||
auto = config.vim.autocomplete;
|
auto = config.vim.autocomplete;
|
||||||
in {
|
in {
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption mkOption types;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.notes = {
|
options.vim.notes = {
|
||||||
obsidian = {
|
obsidian = {
|
||||||
enable = mkEnableOption "complementary neovim plugins for Obsidian editor";
|
enable = mkEnableOption "complementary neovim plugins for Obsidian editor";
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkIf mkMerge nvim;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.notes.orgmode;
|
cfg = config.vim.notes.orgmode;
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable (mkMerge [
|
config = mkIf cfg.enable (mkMerge [
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption types mkOption nvim;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.notes.orgmode = {
|
options.vim.notes.orgmode = {
|
||||||
enable = mkEnableOption "nvim-orgmode: Neovim plugin for Emac Orgmode. Get the best of both worlds";
|
enable = mkEnableOption "nvim-orgmode: Neovim plugin for Emac Orgmode. Get the best of both worlds";
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkMerge mkBinding mkIf;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.notes.todo-comments;
|
cfg = config.vim.notes.todo-comments;
|
||||||
self = import ./todo-comments.nix {inherit lib;};
|
self = import ./todo-comments.nix {inherit lib;};
|
||||||
mappings = self.options.vim.notes.todo-comments.mappings;
|
mappings = self.options.vim.notes.todo-comments.mappings;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{lib, ...}:
|
{lib, ...}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption mkOption types mkMappingOption;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.notes.todo-comments = {
|
options.vim.notes.todo-comments = {
|
||||||
enable = mkEnableOption "todo-comments: highlight and search for todo comments like TODO, HACK, BUG in your code base";
|
enable = mkEnableOption "todo-comments: highlight and search for todo comments like TODO, HACK, BUG in your code base";
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkIf nvim boolToString concatStringsSep;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.projects.project-nvim;
|
cfg = config.vim.projects.project-nvim;
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption mkOption types;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.projects.project-nvim = {
|
options.vim.projects.project-nvim = {
|
||||||
enable = mkEnableOption "project-nvim for project management";
|
enable = mkEnableOption "project-nvim for project management";
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkIf nvim boolToString;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.presence.presence-nvim;
|
cfg = config.vim.presence.presence-nvim;
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption mkOption types;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.presence.presence-nvim = {
|
options.vim.presence.presence-nvim = {
|
||||||
enable = mkEnableOption "presence.nvim plugin for discord rich presence";
|
enable = mkEnableOption "presence.nvim plugin for discord rich presence";
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkIf optionals mkMerge mkBinding nvim concatStringsSep boolToString;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.session.nvim-session-manager;
|
cfg = config.vim.session.nvim-session-manager;
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption mkOption types;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.session.nvim-session-manager = {
|
options.vim.session.nvim-session-manager = {
|
||||||
enable = mkEnableOption "nvim-session-manager: manage sessions like folders in VSCode";
|
enable = mkEnableOption "nvim-session-manager: manage sessions like folders in VSCode";
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkIf;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.snippets.vsnip;
|
cfg = config.vim.snippets.vsnip;
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{lib, ...}:
|
{lib, ...}: let
|
||||||
with lib; {
|
inherit (lib) mkEnableOption;
|
||||||
|
in {
|
||||||
options.vim.snippets.vsnip = {
|
options.vim.snippets.vsnip = {
|
||||||
enable = mkEnableOption "vim-vsnip: snippet LSP/VSCode's format";
|
enable = mkEnableOption "vim-vsnip: snippet LSP/VSCode's format";
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,10 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib; let
|
|
||||||
cfg = config.vim.statusline.lualine;
|
cfg = config.vim.statusline.lualine;
|
||||||
inherit (nvim.lua) luaTable;
|
inherit (lib) mkIf nvim boolToString optionalString;
|
||||||
in {
|
in {
|
||||||
config = (mkIf cfg.enable) {
|
config = (mkIf cfg.enable) {
|
||||||
vim.startPlugins = [
|
vim.startPlugins = [
|
||||||
|
@ -33,21 +32,21 @@ in {
|
||||||
},
|
},
|
||||||
-- active sections
|
-- active sections
|
||||||
sections = {
|
sections = {
|
||||||
lualine_a = ${luaTable (cfg.activeSection.a ++ cfg.extraActiveSection.a)},
|
lualine_a = ${nvim.lua.luaTable (cfg.activeSection.a ++ cfg.extraActiveSection.a)},
|
||||||
lualine_b = ${luaTable (cfg.activeSection.b ++ cfg.extraActiveSection.b)},
|
lualine_b = ${nvim.lua.luaTable (cfg.activeSection.b ++ cfg.extraActiveSection.b)},
|
||||||
lualine_c = ${luaTable (cfg.activeSection.c ++ cfg.extraActiveSection.c)},
|
lualine_c = ${nvim.lua.luaTable (cfg.activeSection.c ++ cfg.extraActiveSection.c)},
|
||||||
lualine_x = ${luaTable (cfg.activeSection.x ++ cfg.extraActiveSection.x)},
|
lualine_x = ${nvim.lua.luaTable (cfg.activeSection.x ++ cfg.extraActiveSection.x)},
|
||||||
lualine_y = ${luaTable (cfg.activeSection.y ++ cfg.extraActiveSection.y)},
|
lualine_y = ${nvim.lua.luaTable (cfg.activeSection.y ++ cfg.extraActiveSection.y)},
|
||||||
lualine_z = ${luaTable (cfg.activeSection.z ++ cfg.extraActiveSection.z)},
|
lualine_z = ${nvim.lua.luaTable (cfg.activeSection.z ++ cfg.extraActiveSection.z)},
|
||||||
},
|
},
|
||||||
--
|
--
|
||||||
inactive_sections = {
|
inactive_sections = {
|
||||||
lualine_a = ${luaTable (cfg.inactiveSection.a ++ cfg.extraInactiveSection.a)},
|
lualine_a = ${nvim.lua.luaTable (cfg.inactiveSection.a ++ cfg.extraInactiveSection.a)},
|
||||||
lualine_b = ${luaTable (cfg.inactiveSection.b ++ cfg.extraInactiveSection.b)},
|
lualine_b = ${nvim.lua.luaTable (cfg.inactiveSection.b ++ cfg.extraInactiveSection.b)},
|
||||||
lualine_c = ${luaTable (cfg.inactiveSection.c ++ cfg.extraInactiveSection.c)},
|
lualine_c = ${nvim.lua.luaTable (cfg.inactiveSection.c ++ cfg.extraInactiveSection.c)},
|
||||||
lualine_x = ${luaTable (cfg.inactiveSection.x ++ cfg.extraInactiveSection.x)},
|
lualine_x = ${nvim.lua.luaTable (cfg.inactiveSection.x ++ cfg.extraInactiveSection.x)},
|
||||||
lualine_y = ${luaTable (cfg.inactiveSection.y ++ cfg.extraInactiveSection.y)},
|
lualine_y = ${nvim.lua.luaTable (cfg.inactiveSection.y ++ cfg.extraInactiveSection.y)},
|
||||||
lualine_z = ${luaTable (cfg.inactiveSection.z ++ cfg.extraInactiveSection.z)},
|
lualine_z = ${nvim.lua.luaTable (cfg.inactiveSection.z ++ cfg.extraInactiveSection.z)},
|
||||||
},
|
},
|
||||||
tabline = {},
|
tabline = {},
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption mkOption types elem optional;
|
||||||
with builtins; let
|
|
||||||
supported_themes = import ./supported_themes.nix;
|
supported_themes = import ./supported_themes.nix;
|
||||||
colorPuccin =
|
colorPuccin =
|
||||||
if config.vim.statusline.lualine.theme == "catppuccin"
|
if config.vim.statusline.lualine.theme == "catppuccin"
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkIf mkMerge mkLuaBinding mkBinding nvim;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.tabline.nvimBufferline;
|
cfg = config.vim.tabline.nvimBufferline;
|
||||||
self = import ./nvim-bufferline.nix {
|
self = import ./nvim-bufferline.nix {
|
||||||
inherit lib;
|
inherit lib;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{lib, ...}:
|
{lib, ...}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption mkMappingOption;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.tabline.nvimBufferline = {
|
options.vim.tabline.nvimBufferline = {
|
||||||
enable = mkEnableOption "nvim-bufferline-lua as a bufferline";
|
enable = mkEnableOption "nvim-bufferline-lua as a bufferline";
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkMerge mkIf mkBinding nvim getExe;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.terminal.toggleterm;
|
cfg = config.vim.terminal.toggleterm;
|
||||||
in {
|
in {
|
||||||
config = mkMerge [
|
config = mkMerge [
|
||||||
|
@ -59,7 +59,7 @@ in {
|
||||||
end
|
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]'})
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption mkOption types mkMappingOption;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.terminal.toggleterm = {
|
options.vim.terminal.toggleterm = {
|
||||||
enable = mkEnableOption "toggleterm as a replacement to built-in terminal command";
|
enable = mkEnableOption "toggleterm as a replacement to built-in terminal command";
|
||||||
mappings = {
|
mappings = {
|
||||||
|
|
|
@ -2,8 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib; {
|
inherit (lib) mkDefault;
|
||||||
|
in {
|
||||||
config = {
|
config = {
|
||||||
vim.theme = {
|
vim.theme = {
|
||||||
enable = mkDefault false;
|
enable = mkDefault false;
|
||||||
|
|
|
@ -2,10 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkOption types attrNames mkIf nvim;
|
||||||
with lib.attrsets;
|
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.theme;
|
cfg = config.vim.theme;
|
||||||
supported_themes = import ./supported_themes.nix {inherit lib;};
|
supported_themes = import ./supported_themes.nix {inherit lib;};
|
||||||
in {
|
in {
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) addDescriptionsToMappings mkIf optional mkSetBinding mkMerge nvim;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.treesitter;
|
cfg = config.vim.treesitter;
|
||||||
usingNvimCmp = config.vim.autocomplete.enable && config.vim.autocomplete.type == "nvim-cmp";
|
usingNvimCmp = config.vim.autocomplete.enable && config.vim.autocomplete.type == "nvim-cmp";
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption mkOption types mkIf nvim boolToString;
|
||||||
with builtins; let
|
|
||||||
treesitter = config.vim.treesitter;
|
treesitter = config.vim.treesitter;
|
||||||
cfg = treesitter.context;
|
cfg = treesitter.context;
|
||||||
in {
|
in {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{lib, ...}:
|
{lib, ...}: let
|
||||||
with lib; {
|
inherit (lib) mkEnableOption mkMappingOption mkOption types;
|
||||||
|
in {
|
||||||
options.vim.treesitter = {
|
options.vim.treesitter = {
|
||||||
enable = mkEnableOption "treesitter, also enabled automatically through language options";
|
enable = mkEnableOption "treesitter, also enabled automatically through language options";
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption mkOption types;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.ui.colorizer = {
|
options.vim.ui.colorizer = {
|
||||||
enable = mkEnableOption "nvim-colorizer.lua for color highlighting";
|
enable = mkEnableOption "nvim-colorizer.lua for color highlighting";
|
||||||
|
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkIf nvim boolToString;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.ui.colorizer;
|
cfg = config.vim.ui.colorizer;
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkIf nvim;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.ui.illuminate;
|
cfg = config.vim.ui.illuminate;
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.ui.illuminate = {
|
options.vim.ui.illuminate = {
|
||||||
enable = mkEnableOption "vim-illuminate: automatically highlight other uses of the word under the cursor";
|
enable = mkEnableOption "vim-illuminate: automatically highlight other uses of the word under the cursor";
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkIf nvim boolToString;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.ui.modes-nvim;
|
cfg = config.vim.ui.modes-nvim;
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{lib, ...}:
|
{lib, ...}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption mkOption types;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.ui.modes-nvim = {
|
options.vim.ui.modes-nvim = {
|
||||||
enable = mkEnableOption "modes.nvim's prismatic line decorations";
|
enable = mkEnableOption "modes.nvim's prismatic line decorations";
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkIf nvim boolToString;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.ui.noice;
|
cfg = config.vim.ui.noice;
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.ui.noice = {
|
options.vim.ui.noice = {
|
||||||
enable = mkEnableOption "noice-nvim UI modification library";
|
enable = mkEnableOption "noice-nvim UI modification library";
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkIf nvim;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.notify.nvim-notify;
|
cfg = config.vim.notify.nvim-notify;
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption mkOption types;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.notify.nvim-notify = {
|
options.vim.notify.nvim-notify = {
|
||||||
enable = mkEnableOption "nvim-notify notifications";
|
enable = mkEnableOption "nvim-notify notifications";
|
||||||
stages = mkOption {
|
stages = mkOption {
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkIf nvim concatStringsSep;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.ui.smartcolumn;
|
cfg = config.vim.ui.smartcolumn;
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{lib, ...}:
|
{lib, ...}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption mkOption types;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.ui.smartcolumn = {
|
options.vim.ui.smartcolumn = {
|
||||||
enable = mkEnableOption "line length indicator";
|
enable = mkEnableOption "line length indicator";
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.binds.cheatsheet = {
|
options.vim.binds.cheatsheet = {
|
||||||
enable = mkEnableOption "cheatsheet-nvim: searchable cheatsheet for nvim using telescope";
|
enable = mkEnableOption "cheatsheet-nvim: searchable cheatsheet for nvim using telescope";
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkIf nvim;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.binds.cheatsheet;
|
cfg = config.vim.binds.cheatsheet;
|
||||||
in {
|
in {
|
||||||
config = mkIf (cfg.enable) {
|
config = mkIf (cfg.enable) {
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkIf nvim;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.binds.whichKey;
|
cfg = config.vim.binds.whichKey;
|
||||||
in {
|
in {
|
||||||
config = mkIf (cfg.enable) {
|
config = mkIf (cfg.enable) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{lib, ...}:
|
{lib, ...}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.binds.whichKey = {
|
options.vim.binds.whichKey = {
|
||||||
enable = mkEnableOption "which-key keybind helper menu";
|
enable = mkEnableOption "which-key keybind helper menu";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{lib, ...}:
|
{lib, ...}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption mkMappingOption;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.utility.ccc = {
|
options.vim.utility.ccc = {
|
||||||
enable = mkEnableOption "ccc color picker for neovim";
|
enable = mkEnableOption "ccc color picker for neovim";
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) addDescriptionsToMappings mkIf nvim;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.utility.ccc;
|
cfg = config.vim.utility.ccc;
|
||||||
self = import ./ccc.nix {inherit lib;};
|
self = import ./ccc.nix {inherit lib;};
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkIf nvim;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.utility.diffview-nvim;
|
cfg = config.vim.utility.diffview-nvim;
|
||||||
in {
|
in {
|
||||||
config = mkIf (cfg.enable) {
|
config = mkIf (cfg.enable) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{lib, ...}:
|
{lib, ...}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.utility.diffview-nvim = {
|
options.vim.utility.diffview-nvim = {
|
||||||
enable = mkEnableOption "diffview-nvim: cycle through diffs for all modified files for any git rev";
|
enable = mkEnableOption "diffview-nvim: cycle through diffs for all modified files for any git rev";
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) addDescriptionsToMappings mkIf mkMerge mkSetLuaBinding nvim;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.gestures.gesture-nvim;
|
cfg = config.vim.gestures.gesture-nvim;
|
||||||
|
|
||||||
self = import ./gesture-nvim.nix {inherit lib;};
|
self = import ./gesture-nvim.nix {inherit lib;};
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{lib, ...}:
|
{lib, ...}: let
|
||||||
with lib; {
|
inherit (lib) mkEnableOption mkMappingOption;
|
||||||
|
in {
|
||||||
options.vim.gestures.gesture-nvim = {
|
options.vim.gestures.gesture-nvim = {
|
||||||
enable = mkEnableOption "gesture-nvim: mouse gestures";
|
enable = mkEnableOption "gesture-nvim: mouse gestures";
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkIf nvim;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.utility.icon-picker;
|
cfg = config.vim.utility.icon-picker;
|
||||||
in {
|
in {
|
||||||
config = mkIf (cfg.enable) {
|
config = mkIf (cfg.enable) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{lib, ...}:
|
{lib, ...}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.utility.icon-picker = {
|
options.vim.utility.icon-picker = {
|
||||||
enable = mkEnableOption "nerdfonts icon picker for nvim";
|
enable = mkEnableOption "nerdfonts icon picker for nvim";
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,8 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib; let
|
inherit (lib) addDescriptionsToMappings mkIf mkSetBinding nvim;
|
||||||
|
|
||||||
cfg = config.vim.utility.motion.hop;
|
cfg = config.vim.utility.motion.hop;
|
||||||
|
|
||||||
self = import ./hop.nix {inherit lib;};
|
self = import ./hop.nix {inherit lib;};
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{lib, ...}:
|
{lib, ...}: let
|
||||||
with lib; {
|
inherit (lib) mkMappingOption mkEnableOption;
|
||||||
|
in {
|
||||||
options.vim.utility.motion.hop = {
|
options.vim.utility.motion.hop = {
|
||||||
mappings = {
|
mappings = {
|
||||||
hop = mkMappingOption "Jump to occurences [hop.nvim]" "<leader>h";
|
hop = mkMappingOption "Jump to occurences [hop.nvim]" "<leader>h";
|
||||||
|
|
|
@ -2,8 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib; let
|
inherit (lib) mkIf mkMerge mkBinding nvim;
|
||||||
|
|
||||||
cfg = config.vim.utility.motion.leap;
|
cfg = config.vim.utility.motion.leap;
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{lib, ...}:
|
{lib, ...}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption mkOption types;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.utility.motion.leap = {
|
options.vim.utility.motion.leap = {
|
||||||
enable = mkEnableOption "leap.nvim plugin (easy motion)";
|
enable = mkEnableOption "leap.nvim plugin (easy motion)";
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) addDescriptionsToMappings mkIf mkMerge mkSetBinding nvim;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.utility.surround;
|
cfg = config.vim.utility.surround;
|
||||||
self = import ./surround.nix {inherit lib config;};
|
self = import ./surround.nix {inherit lib config;};
|
||||||
mappingDefinitions = self.options.vim.utility.surround.mappings;
|
mappingDefinitions = self.options.vim.utility.surround.mappings;
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkOption types mkIf mkDefault;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.utility.surround = {
|
options.vim.utility.surround = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) addDescriptionsToMappings mkIf mkMerge mkSetBinding nvim;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.telescope;
|
cfg = config.vim.telescope;
|
||||||
self = import ./telescope.nix {inherit lib;};
|
self = import ./telescope.nix {inherit lib;};
|
||||||
mappingDefinitions = self.options.vim.telescope.mappings;
|
mappingDefinitions = self.options.vim.telescope.mappings;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{lib, ...}:
|
{lib, ...}: let
|
||||||
with lib;
|
inherit (lib) mkMappingOption mkEnableOption;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.telescope = {
|
options.vim.telescope = {
|
||||||
mappings = {
|
mappings = {
|
||||||
findProjects = mkMappingOption "Find files [Telescope]" "<leader>fp";
|
findProjects = mkMappingOption "Find files [Telescope]" "<leader>fp";
|
||||||
|
|
|
@ -3,9 +3,9 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkIf nvim;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.utility.vim-wakatime;
|
cfg = config.vim.utility.vim-wakatime;
|
||||||
in {
|
in {
|
||||||
config = mkIf (cfg.enable) {
|
config = mkIf (cfg.enable) {
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption mkOption types;
|
||||||
with builtins; {
|
in {
|
||||||
options.vim.utility.vim-wakatime = {
|
options.vim.utility.vim-wakatime = {
|
||||||
enable = mkEnableOption "vim-wakatime: live code statistics";
|
enable = mkEnableOption "vim-wakatime: live code statistics";
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib; let
|
inherit (lib) mkIf mkMerge nvim optionalString boolToString mkBinding;
|
||||||
|
|
||||||
cfg = config.vim.visuals;
|
cfg = config.vim.visuals;
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable (mkMerge [
|
config = mkIf cfg.enable (mkMerge [
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
with lib;
|
inherit (lib) mkEnableOption mkMappingOption mkOption types literalExpression;
|
||||||
with builtins; let
|
|
||||||
cfg = config.vim.visuals;
|
cfg = config.vim.visuals;
|
||||||
in {
|
in {
|
||||||
options.vim.visuals = {
|
options.vim.visuals = {
|
||||||
|
|
Loading…
Reference in a new issue