mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 18:31:35 +00:00
Merge branch 'main' into telescope-ext
This commit is contained in:
commit
4b22740c9a
142 changed files with 2956 additions and 34 deletions
|
@ -27,6 +27,7 @@
|
|||
"git"
|
||||
"languages"
|
||||
"lsp"
|
||||
"mini"
|
||||
"minimap"
|
||||
"notes"
|
||||
"projects"
|
||||
|
|
|
@ -55,8 +55,14 @@ in {
|
|||
|
||||
preventJunkFiles = mkOption {
|
||||
type = bool;
|
||||
default = false;
|
||||
description = "Prevent swapfile and backupfile from being created";
|
||||
default = true;
|
||||
example = false;
|
||||
description = ''
|
||||
Prevent swapfile and backupfile from being created.
|
||||
|
||||
`false` is the default Neovim behaviour. If you wish to create
|
||||
backup and swapfiles, set this option to `false`.
|
||||
'';
|
||||
};
|
||||
|
||||
bell = mkOption {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
imports = [
|
||||
./basic.nix
|
||||
./debug.nix
|
||||
./highlight.nix
|
||||
./spellcheck.nix
|
||||
];
|
||||
}
|
||||
|
|
119
modules/neovim/init/highlight.nix
Normal file
119
modules/neovim/init/highlight.nix
Normal file
|
@ -0,0 +1,119 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkOption;
|
||||
inherit (lib.types) nullOr attrsOf listOf submodule bool ints str enum;
|
||||
inherit (lib.strings) hasPrefix concatLines;
|
||||
inherit (lib.attrsets) mapAttrsToList;
|
||||
inherit (lib.nvim.dag) entryBetween;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
inherit (lib.nvim.types) hexColor;
|
||||
|
||||
mkColorOption = target:
|
||||
mkOption {
|
||||
type = nullOr hexColor;
|
||||
default = null;
|
||||
example = "#ebdbb2";
|
||||
description = ''
|
||||
The ${target} color to use. Written as color name or hex "#RRGGBB".
|
||||
'';
|
||||
};
|
||||
|
||||
mkBoolOption = name:
|
||||
mkOption {
|
||||
type = nullOr bool;
|
||||
default = null;
|
||||
example = false;
|
||||
description = "Whether to enable ${name}";
|
||||
};
|
||||
|
||||
cfg = config.vim.highlight;
|
||||
in {
|
||||
options.vim.highlight = mkOption {
|
||||
type = attrsOf (submodule {
|
||||
# See :h nvim_set_hl
|
||||
options = {
|
||||
bg = mkColorOption "background";
|
||||
fg = mkColorOption "foreground";
|
||||
sp = mkColorOption "special";
|
||||
blend = mkOption {
|
||||
type = nullOr (ints.between 0 100);
|
||||
default = null;
|
||||
description = "Blend as an integer between 0 and 100";
|
||||
};
|
||||
bold = mkBoolOption "bold";
|
||||
standout = mkBoolOption "standout";
|
||||
underline = mkBoolOption "underline";
|
||||
undercurl = mkBoolOption "undercurl";
|
||||
underdouble = mkBoolOption "underdouble";
|
||||
underdotted = mkBoolOption "underdotted";
|
||||
underdashed = mkBoolOption "underdashed";
|
||||
strikethrough = mkBoolOption "strikethrough";
|
||||
italic = mkBoolOption "italic";
|
||||
reverse = mkBoolOption "reverse";
|
||||
nocombine = mkBoolOption "nocombine";
|
||||
link = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
description = "The name of another highlight group to link to";
|
||||
};
|
||||
default = mkOption {
|
||||
type = nullOr bool;
|
||||
default = null;
|
||||
description = "Don't override existing definition";
|
||||
};
|
||||
ctermfg = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
description = "The cterm foreground color to use";
|
||||
};
|
||||
ctermbg = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
description = "The cterm background color to use";
|
||||
};
|
||||
cterm = mkOption {
|
||||
type = nullOr (listOf (enum [
|
||||
"bold"
|
||||
"underline"
|
||||
"undercurl"
|
||||
"underdouble"
|
||||
"underdotted"
|
||||
"underdashed"
|
||||
"strikethrough"
|
||||
"reverse"
|
||||
"inverse"
|
||||
"italic"
|
||||
"standout"
|
||||
"altfont"
|
||||
"nocombine"
|
||||
"NONE"
|
||||
]));
|
||||
default = null;
|
||||
description = "The cterm arguments to use. See ':h highlight-args'";
|
||||
};
|
||||
force = mkBoolOption "force update";
|
||||
};
|
||||
});
|
||||
default = {};
|
||||
example = {
|
||||
SignColumn = {
|
||||
bg = "#282828";
|
||||
};
|
||||
};
|
||||
description = "Custom highlights to apply";
|
||||
};
|
||||
|
||||
config = {
|
||||
vim.luaConfigRC.highlight = let
|
||||
highlights =
|
||||
mapAttrsToList (
|
||||
name: value: ''vim.api.nvim_set_hl(0, ${toLuaObject name}, ${toLuaObject value})''
|
||||
)
|
||||
cfg;
|
||||
in
|
||||
entryBetween ["lazyConfigs" "pluginConfigs" "extraPluginConfigs"] ["theme"] (concatLines highlights);
|
||||
};
|
||||
}
|
|
@ -187,17 +187,6 @@ in {
|
|||
'';
|
||||
}
|
||||
];
|
||||
vim.pluginRC.nix = ''
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
pattern = "nix",
|
||||
callback = function(opts)
|
||||
local bo = vim.bo[opts.buf]
|
||||
bo.tabstop = 2
|
||||
bo.shiftwidth = 2
|
||||
bo.softtabstop = 2
|
||||
end
|
||||
})
|
||||
'';
|
||||
}
|
||||
|
||||
(mkIf cfg.treesitter.enable {
|
||||
|
|
|
@ -106,6 +106,24 @@
|
|||
)
|
||||
'';
|
||||
};
|
||||
|
||||
ruff = {
|
||||
package = pkgs.writeShellApplication {
|
||||
name = "ruff";
|
||||
runtimeInputs = [pkgs.ruff];
|
||||
text = ''
|
||||
ruff format -
|
||||
'';
|
||||
};
|
||||
nullConfig = ''
|
||||
table.insert(
|
||||
ls_sources,
|
||||
null_ls.builtins.formatting.ruff.with({
|
||||
command = "${cfg.format.package}/bin/ruff",
|
||||
})
|
||||
)
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
defaultDebugger = "debugpy";
|
||||
|
|
|
@ -8,10 +8,12 @@
|
|||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.modules) mkIf mkMerge mkDefault;
|
||||
inherit (lib.lists) isList;
|
||||
inherit (lib.types) either listOf package str enum;
|
||||
inherit (lib.types) bool either listOf package str enum;
|
||||
inherit (lib.nvim.lua) expToLua;
|
||||
inherit (lib.nvim.types) mkGrammarOption;
|
||||
|
||||
cfg = config.vim.languages.zig;
|
||||
|
||||
defaultServer = "zls";
|
||||
servers = {
|
||||
zls = {
|
||||
|
@ -31,7 +33,35 @@
|
|||
};
|
||||
};
|
||||
|
||||
cfg = config.vim.languages.zig;
|
||||
# TODO: dap.adapter.lldb is duplicated when enabling the
|
||||
# vim.languages.clang.dap module. This does not cause
|
||||
# breakage... but could be cleaner.
|
||||
defaultDebugger = "lldb-vscode";
|
||||
debuggers = {
|
||||
lldb-vscode = {
|
||||
package = pkgs.lldb;
|
||||
dapConfig = ''
|
||||
dap.adapters.lldb = {
|
||||
type = 'executable',
|
||||
command = '${cfg.dap.package}/bin/lldb-dap',
|
||||
name = 'lldb'
|
||||
}
|
||||
dap.configurations.zig = {
|
||||
{
|
||||
name = 'Launch',
|
||||
type = 'lldb',
|
||||
request = 'launch',
|
||||
program = function()
|
||||
return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file')
|
||||
end,
|
||||
cwd = "''${workspaceFolder}",
|
||||
stopOnEntry = false,
|
||||
args = {},
|
||||
},
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
in {
|
||||
options.vim.languages.zig = {
|
||||
enable = mkEnableOption "Zig language support";
|
||||
|
@ -56,6 +86,26 @@ in {
|
|||
default = pkgs.zls;
|
||||
};
|
||||
};
|
||||
|
||||
dap = {
|
||||
enable = mkOption {
|
||||
type = bool;
|
||||
default = config.vim.languages.enableDAP;
|
||||
description = "Enable Zig Debug Adapter";
|
||||
};
|
||||
|
||||
debugger = mkOption {
|
||||
type = enum (attrNames debuggers);
|
||||
default = defaultDebugger;
|
||||
description = "Zig debugger to use";
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = package;
|
||||
default = debuggers.${cfg.dap.debugger}.package;
|
||||
description = "Zig debugger package.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
|
@ -77,5 +127,12 @@ in {
|
|||
globals.zig_fmt_autosave = mkDefault 0;
|
||||
};
|
||||
})
|
||||
|
||||
(mkIf cfg.dap.enable {
|
||||
vim = {
|
||||
debugger.nvim-dap.enable = true;
|
||||
debugger.nvim-dap.sources.zig-debugger = debuggers.${cfg.dap.debugger}.dapConfig;
|
||||
};
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.strings) optionalString;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
|
@ -12,13 +13,29 @@ in {
|
|||
config = mkIf (cfg.enable && cfg.lightbulb.enable) {
|
||||
vim = {
|
||||
startPlugins = ["nvim-lightbulb"];
|
||||
|
||||
pluginRC.lightbulb = entryAnywhere ''
|
||||
vim.api.nvim_command('autocmd CursorHold,CursorHoldI * lua require\'nvim-lightbulb\'.update_lightbulb()')
|
||||
|
||||
-- Enable trouble diagnostics viewer
|
||||
require'nvim-lightbulb'.setup(${toLuaObject cfg.lightbulb.setupOpts})
|
||||
local nvim_lightbulb = require("nvim-lightbulb")
|
||||
nvim_lightbulb.setup(${toLuaObject cfg.lightbulb.setupOpts})
|
||||
${optionalString cfg.lightbulb.autocmd.enable ''
|
||||
vim.api.nvim_create_autocmd(${toLuaObject cfg.lightbulb.autocmd.events}, {
|
||||
pattern = ${toLuaObject cfg.lightbulb.autocmd.pattern},
|
||||
callback = function()
|
||||
nvim_lightbulb.update_lightbulb()
|
||||
end,
|
||||
})
|
||||
''}
|
||||
'';
|
||||
};
|
||||
|
||||
warnings = [
|
||||
# This could have been an assertion, but the chances of collision is very low and asserting here
|
||||
# might be too dramatic. Let's only warn the user, *in case* this occurs and is not intended. No
|
||||
# error will be thrown if 'lightbulb.setupOpts.autocmd.enable' has not been set by the user.
|
||||
(mkIf (cfg.lightbulb.autocmd.enable -> (cfg.lightbulb.setupOpts.autocmd.enabled or false)) ''
|
||||
Both 'vim.lsp.lightbulb.autocmd.enable' and 'vim.lsp.lightbulb.setupOpts.autocmd.enable' are set
|
||||
simultaneously. This might have performance implications due to frequent updates. Please set only
|
||||
one option to handle nvim-lightbulb autocmd.
|
||||
'')
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,11 +1,29 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.types) listOf str either;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption luaInline;
|
||||
in {
|
||||
options.vim.lsp = {
|
||||
lightbulb = {
|
||||
enable = mkEnableOption "Lightbulb for code actions. Requires an emoji font";
|
||||
setupOpts = mkPluginSetupOption "nvim-lightbulb" {};
|
||||
autocmd = {
|
||||
enable = mkEnableOption "updating lightbulb glyph automatically" // {default = true;};
|
||||
events = mkOption {
|
||||
type = listOf str;
|
||||
default = ["CursorHold" "CursorHoldI"];
|
||||
description = "Events on which to update nvim-lightbulb glyphs";
|
||||
};
|
||||
|
||||
pattern = mkOption {
|
||||
type = either str luaInline;
|
||||
default = "*";
|
||||
description = ''
|
||||
File patterns or buffer names to match, determining which files or buffers trigger
|
||||
glyph updates.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
13
modules/plugins/mini/ai/ai.nix
Normal file
13
modules/plugins/mini/ai/ai.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.mini.ai = {
|
||||
enable = mkEnableOption "mini.ai";
|
||||
setupOpts = mkPluginSetupOption "mini.ai" {};
|
||||
};
|
||||
}
|
19
modules/plugins/mini/ai/config.nix
Normal file
19
modules/plugins/mini/ai/config.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.mini.ai;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-ai"];
|
||||
|
||||
pluginRC.mini-ai = entryAnywhere ''
|
||||
require("mini.ai").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/ai/default.nix
Normal file
6
modules/plugins/mini/ai/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./ai.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
13
modules/plugins/mini/align/align.nix
Normal file
13
modules/plugins/mini/align/align.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.mini.align = {
|
||||
enable = mkEnableOption "mini.align";
|
||||
setupOpts = mkPluginSetupOption "mini.align" {};
|
||||
};
|
||||
}
|
19
modules/plugins/mini/align/config.nix
Normal file
19
modules/plugins/mini/align/config.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.mini.align;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-align"];
|
||||
|
||||
pluginRC.mini-align = entryAnywhere ''
|
||||
require("mini.align").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/align/default.nix
Normal file
6
modules/plugins/mini/align/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./align.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
13
modules/plugins/mini/animate/animate.nix
Normal file
13
modules/plugins/mini/animate/animate.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.mini.animate = {
|
||||
enable = mkEnableOption "mini.animate";
|
||||
setupOpts = mkPluginSetupOption "mini.animate" {};
|
||||
};
|
||||
}
|
19
modules/plugins/mini/animate/config.nix
Normal file
19
modules/plugins/mini/animate/config.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.mini.animate;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-animate"];
|
||||
|
||||
pluginRC.mini-animate = entryAnywhere ''
|
||||
require("mini.animate").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/animate/default.nix
Normal file
6
modules/plugins/mini/animate/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./animate.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
13
modules/plugins/mini/basics/basics.nix
Normal file
13
modules/plugins/mini/basics/basics.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.mini.basics = {
|
||||
enable = mkEnableOption "mini.basics";
|
||||
setupOpts = mkPluginSetupOption "mini.basics" {};
|
||||
};
|
||||
}
|
19
modules/plugins/mini/basics/config.nix
Normal file
19
modules/plugins/mini/basics/config.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.mini.basics;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-basics"];
|
||||
|
||||
pluginRC.mini-basics = entryAnywhere ''
|
||||
require("mini.basics").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/basics/default.nix
Normal file
6
modules/plugins/mini/basics/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./basics.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
13
modules/plugins/mini/bracketed/bracketed.nix
Normal file
13
modules/plugins/mini/bracketed/bracketed.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.mini.bracketed = {
|
||||
enable = mkEnableOption "mini.bracketed";
|
||||
setupOpts = mkPluginSetupOption "mini.bracketed" {};
|
||||
};
|
||||
}
|
19
modules/plugins/mini/bracketed/config.nix
Normal file
19
modules/plugins/mini/bracketed/config.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.mini.bracketed;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-bracketed"];
|
||||
|
||||
pluginRC.mini-bracketed = entryAnywhere ''
|
||||
require("mini.bracketed").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/bracketed/default.nix
Normal file
6
modules/plugins/mini/bracketed/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./bracketed.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
13
modules/plugins/mini/bufremove/bufremove.nix
Normal file
13
modules/plugins/mini/bufremove/bufremove.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.mini.bufremove = {
|
||||
enable = mkEnableOption "mini.bufremove";
|
||||
setupOpts = mkPluginSetupOption "mini.bufremove" {};
|
||||
};
|
||||
}
|
19
modules/plugins/mini/bufremove/config.nix
Normal file
19
modules/plugins/mini/bufremove/config.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.mini.bufremove;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-bufremove"];
|
||||
|
||||
pluginRC.mini-bufremove = entryAnywhere ''
|
||||
require("mini.bufremove").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/bufremove/default.nix
Normal file
6
modules/plugins/mini/bufremove/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./bufremove.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
13
modules/plugins/mini/clue/clue.nix
Normal file
13
modules/plugins/mini/clue/clue.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.mini.clue = {
|
||||
enable = mkEnableOption "mini.clue";
|
||||
setupOpts = mkPluginSetupOption "mini.clue" {};
|
||||
};
|
||||
}
|
19
modules/plugins/mini/clue/config.nix
Normal file
19
modules/plugins/mini/clue/config.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.mini.clue;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-clue"];
|
||||
|
||||
pluginRC.mini-clue = entryAnywhere ''
|
||||
require("mini.clue").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/clue/default.nix
Normal file
6
modules/plugins/mini/clue/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./clue.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
11
modules/plugins/mini/colors/colors.nix
Normal file
11
modules/plugins/mini/colors/colors.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in {
|
||||
options.vim.mini.colors = {
|
||||
enable = mkEnableOption "mini.colors";
|
||||
};
|
||||
}
|
18
modules/plugins/mini/colors/config.nix
Normal file
18
modules/plugins/mini/colors/config.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
|
||||
cfg = config.vim.mini.colors;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-colors"];
|
||||
|
||||
pluginRC.mini-colors = entryAnywhere ''
|
||||
require("mini.colors").setup()
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/colors/default.nix
Normal file
6
modules/plugins/mini/colors/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./colors.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
13
modules/plugins/mini/comment/comment.nix
Normal file
13
modules/plugins/mini/comment/comment.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.mini.comment = {
|
||||
enable = mkEnableOption "mini.comment";
|
||||
setupOpts = mkPluginSetupOption "mini.comment" {};
|
||||
};
|
||||
}
|
19
modules/plugins/mini/comment/config.nix
Normal file
19
modules/plugins/mini/comment/config.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.mini.comment;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-comment"];
|
||||
|
||||
pluginRC.mini-comment = entryAnywhere ''
|
||||
require("mini.comment").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/comment/default.nix
Normal file
6
modules/plugins/mini/comment/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./comment.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
13
modules/plugins/mini/completion/completion.nix
Normal file
13
modules/plugins/mini/completion/completion.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.mini.completion = {
|
||||
enable = mkEnableOption "mini.completion";
|
||||
setupOpts = mkPluginSetupOption "mini.completion" {};
|
||||
};
|
||||
}
|
19
modules/plugins/mini/completion/config.nix
Normal file
19
modules/plugins/mini/completion/config.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.mini.completion;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-completion"];
|
||||
|
||||
pluginRC.mini-completion = entryAnywhere ''
|
||||
require("mini.completion").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/completion/default.nix
Normal file
6
modules/plugins/mini/completion/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./completion.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
44
modules/plugins/mini/default.nix
Normal file
44
modules/plugins/mini/default.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
imports = [
|
||||
./ai
|
||||
./align
|
||||
./animate
|
||||
# ./base16 # NOTE: configured in theme/
|
||||
./basics
|
||||
./bracketed
|
||||
./bufremove
|
||||
./clue
|
||||
./colors
|
||||
./comment
|
||||
./completion
|
||||
./diff
|
||||
./doc
|
||||
./extra
|
||||
./files
|
||||
./fuzzy
|
||||
./git
|
||||
./hipatterns
|
||||
./hues
|
||||
./icons
|
||||
./indentscope
|
||||
./jump
|
||||
./jump2d
|
||||
./map
|
||||
./misc
|
||||
./move
|
||||
./notify
|
||||
./operators
|
||||
./pairs
|
||||
./pick
|
||||
./sessions
|
||||
./snippets
|
||||
./splitjoin
|
||||
./starter
|
||||
./statusline
|
||||
./surround
|
||||
./tabline
|
||||
./test
|
||||
./trailspace
|
||||
./visits
|
||||
];
|
||||
}
|
19
modules/plugins/mini/diff/config.nix
Normal file
19
modules/plugins/mini/diff/config.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.mini.diff;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-diff"];
|
||||
|
||||
pluginRC.mini-diff = entryAnywhere ''
|
||||
require("mini.diff").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/diff/default.nix
Normal file
6
modules/plugins/mini/diff/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./diff.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
13
modules/plugins/mini/diff/diff.nix
Normal file
13
modules/plugins/mini/diff/diff.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.mini.diff = {
|
||||
enable = mkEnableOption "mini.diff";
|
||||
setupOpts = mkPluginSetupOption "mini.diff" {};
|
||||
};
|
||||
}
|
19
modules/plugins/mini/doc/config.nix
Normal file
19
modules/plugins/mini/doc/config.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.mini.doc;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-doc"];
|
||||
|
||||
pluginRC.mini-doc = entryAnywhere ''
|
||||
require("mini.doc").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/doc/default.nix
Normal file
6
modules/plugins/mini/doc/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./doc.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
13
modules/plugins/mini/doc/doc.nix
Normal file
13
modules/plugins/mini/doc/doc.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.mini.doc = {
|
||||
enable = mkEnableOption "mini.doc";
|
||||
setupOpts = mkPluginSetupOption "mini.doc" {};
|
||||
};
|
||||
}
|
18
modules/plugins/mini/extra/config.nix
Normal file
18
modules/plugins/mini/extra/config.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
|
||||
cfg = config.vim.mini.extra;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-extra"];
|
||||
|
||||
pluginRC.mini-extra = entryAnywhere ''
|
||||
require("mini.extra").setup()
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/extra/default.nix
Normal file
6
modules/plugins/mini/extra/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./extra.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
11
modules/plugins/mini/extra/extra.nix
Normal file
11
modules/plugins/mini/extra/extra.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
in {
|
||||
options.vim.mini.extra = {
|
||||
enable = mkEnableOption "mini.extra";
|
||||
};
|
||||
}
|
19
modules/plugins/mini/files/config.nix
Normal file
19
modules/plugins/mini/files/config.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.mini.files;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-files"];
|
||||
|
||||
pluginRC.mini-files = entryAnywhere ''
|
||||
require("mini.files").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/files/default.nix
Normal file
6
modules/plugins/mini/files/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./files.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
13
modules/plugins/mini/files/files.nix
Normal file
13
modules/plugins/mini/files/files.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.mini.files = {
|
||||
enable = mkEnableOption "mini.files";
|
||||
setupOpts = mkPluginSetupOption "mini.files" {};
|
||||
};
|
||||
}
|
19
modules/plugins/mini/fuzzy/config.nix
Normal file
19
modules/plugins/mini/fuzzy/config.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.mini.fuzzy;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-fuzzy"];
|
||||
|
||||
pluginRC.mini-fuzzy = entryAnywhere ''
|
||||
require("mini.fuzzy").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/fuzzy/default.nix
Normal file
6
modules/plugins/mini/fuzzy/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./fuzzy.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
13
modules/plugins/mini/fuzzy/fuzzy.nix
Normal file
13
modules/plugins/mini/fuzzy/fuzzy.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.mini.fuzzy = {
|
||||
enable = mkEnableOption "mini.fuzzy";
|
||||
setupOpts = mkPluginSetupOption "mini.fuzzy" {};
|
||||
};
|
||||
}
|
19
modules/plugins/mini/git/config.nix
Normal file
19
modules/plugins/mini/git/config.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.mini.git;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-git"];
|
||||
|
||||
pluginRC.mini-git = entryAnywhere ''
|
||||
require("mini.git").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/git/default.nix
Normal file
6
modules/plugins/mini/git/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./git.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
13
modules/plugins/mini/git/git.nix
Normal file
13
modules/plugins/mini/git/git.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.mini.git = {
|
||||
enable = mkEnableOption "mini.git";
|
||||
setupOpts = mkPluginSetupOption "mini.git" {};
|
||||
};
|
||||
}
|
19
modules/plugins/mini/hipatterns/config.nix
Normal file
19
modules/plugins/mini/hipatterns/config.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.mini.hipatterns;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-hipatterns"];
|
||||
|
||||
pluginRC.mini-hipatterns = entryAnywhere ''
|
||||
require("mini.hipatterns").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/hipatterns/default.nix
Normal file
6
modules/plugins/mini/hipatterns/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./hipatterns.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
13
modules/plugins/mini/hipatterns/hipatterns.nix
Normal file
13
modules/plugins/mini/hipatterns/hipatterns.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.mini.hipatterns = {
|
||||
enable = mkEnableOption "mini.hipatterns";
|
||||
setupOpts = mkPluginSetupOption "mini.hipatterns" {};
|
||||
};
|
||||
}
|
19
modules/plugins/mini/hues/config.nix
Normal file
19
modules/plugins/mini/hues/config.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.mini.hues;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-hues"];
|
||||
|
||||
pluginRC.mini-hues = entryAnywhere ''
|
||||
require("mini.hues").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/hues/default.nix
Normal file
6
modules/plugins/mini/hues/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./hues.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
25
modules/plugins/mini/hues/hues.nix
Normal file
25
modules/plugins/mini/hues/hues.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.strings) hasPrefix;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
inherit (lib.nvim.types) hexColor;
|
||||
in {
|
||||
options.vim.mini.hues = {
|
||||
enable = mkEnableOption "mini.hues";
|
||||
setupOpts = mkPluginSetupOption "mini.hues" {
|
||||
background = mkOption {
|
||||
description = "The hex color for the background color of the color scheme, prefixed with #";
|
||||
type = hexColor;
|
||||
};
|
||||
|
||||
foreground = mkOption {
|
||||
description = "The hex color for the foreground color of the color scheme, prefixed with #";
|
||||
type = hexColor;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
19
modules/plugins/mini/icons/config.nix
Normal file
19
modules/plugins/mini/icons/config.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.mini.icons;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-icons"];
|
||||
|
||||
pluginRC.mini-icons = entryAnywhere ''
|
||||
require("mini.icons").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/icons/default.nix
Normal file
6
modules/plugins/mini/icons/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./icons.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
13
modules/plugins/mini/icons/icons.nix
Normal file
13
modules/plugins/mini/icons/icons.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.mini.icons = {
|
||||
enable = mkEnableOption "mini.icons";
|
||||
setupOpts = mkPluginSetupOption "mini.icons" {};
|
||||
};
|
||||
}
|
19
modules/plugins/mini/indentscope/config.nix
Normal file
19
modules/plugins/mini/indentscope/config.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.mini.indentscope;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-indentscope"];
|
||||
|
||||
pluginRC.mini-indentscope = entryAnywhere ''
|
||||
require("mini.indentscope").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/indentscope/default.nix
Normal file
6
modules/plugins/mini/indentscope/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./indentscope.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
13
modules/plugins/mini/indentscope/indentscope.nix
Normal file
13
modules/plugins/mini/indentscope/indentscope.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.mini.indentscope = {
|
||||
enable = mkEnableOption "mini.indentscope";
|
||||
setupOpts = mkPluginSetupOption "mini.indentscope" {};
|
||||
};
|
||||
}
|
19
modules/plugins/mini/jump/config.nix
Normal file
19
modules/plugins/mini/jump/config.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.mini.jump;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-jump"];
|
||||
|
||||
pluginRC.mini-jump = entryAnywhere ''
|
||||
require("mini.jump").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/jump/default.nix
Normal file
6
modules/plugins/mini/jump/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./jump.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
13
modules/plugins/mini/jump/jump.nix
Normal file
13
modules/plugins/mini/jump/jump.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.mini.jump = {
|
||||
enable = mkEnableOption "mini.jump";
|
||||
setupOpts = mkPluginSetupOption "mini.jump" {};
|
||||
};
|
||||
}
|
19
modules/plugins/mini/jump2d/config.nix
Normal file
19
modules/plugins/mini/jump2d/config.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.mini.jump2d;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-jump2d"];
|
||||
|
||||
pluginRC.mini-jump2d = entryAnywhere ''
|
||||
require("mini.jump2d").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/jump2d/default.nix
Normal file
6
modules/plugins/mini/jump2d/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./jump2d.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
13
modules/plugins/mini/jump2d/jump2d.nix
Normal file
13
modules/plugins/mini/jump2d/jump2d.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.mini.jump2d = {
|
||||
enable = mkEnableOption "mini.jump2d";
|
||||
setupOpts = mkPluginSetupOption "mini.jump2d" {};
|
||||
};
|
||||
}
|
19
modules/plugins/mini/map/config.nix
Normal file
19
modules/plugins/mini/map/config.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.mini.map;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-map"];
|
||||
|
||||
pluginRC.mini-map = entryAnywhere ''
|
||||
require("mini.map").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/map/default.nix
Normal file
6
modules/plugins/mini/map/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./map.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
13
modules/plugins/mini/map/map.nix
Normal file
13
modules/plugins/mini/map/map.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.mini.map = {
|
||||
enable = mkEnableOption "mini.map";
|
||||
setupOpts = mkPluginSetupOption "mini.map" {};
|
||||
};
|
||||
}
|
19
modules/plugins/mini/misc/config.nix
Normal file
19
modules/plugins/mini/misc/config.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.mini.misc;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-misc"];
|
||||
|
||||
pluginRC.mini-misc = entryAnywhere ''
|
||||
require("mini.misc").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/misc/default.nix
Normal file
6
modules/plugins/mini/misc/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./misc.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
13
modules/plugins/mini/misc/misc.nix
Normal file
13
modules/plugins/mini/misc/misc.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.mini.misc = {
|
||||
enable = mkEnableOption "mini.misc";
|
||||
setupOpts = mkPluginSetupOption "mini.misc" {};
|
||||
};
|
||||
}
|
19
modules/plugins/mini/move/config.nix
Normal file
19
modules/plugins/mini/move/config.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.mini.move;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-move"];
|
||||
|
||||
pluginRC.mini-move = entryAnywhere ''
|
||||
require("mini.move").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/move/default.nix
Normal file
6
modules/plugins/mini/move/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./move.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
13
modules/plugins/mini/move/move.nix
Normal file
13
modules/plugins/mini/move/move.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.mini.move = {
|
||||
enable = mkEnableOption "mini.move";
|
||||
setupOpts = mkPluginSetupOption "mini.move" {};
|
||||
};
|
||||
}
|
20
modules/plugins/mini/notify/config.nix
Normal file
20
modules/plugins/mini/notify/config.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf mkAssert;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.mini.notify;
|
||||
in {
|
||||
vim = mkIf cfg.enable (mkAssert (!config.vim.notify.nvim-notify.enable) "Mini.notify is incompatible with nvim-notify!" {
|
||||
startPlugins = ["mini-notify"];
|
||||
|
||||
pluginRC.mini-notify = entryAnywhere ''
|
||||
require("mini.notify").setup(${toLuaObject cfg.setupOpts})
|
||||
vim.notify = MiniNotify.make_notify(${toLuaObject cfg.notifyOpts})
|
||||
'';
|
||||
});
|
||||
}
|
6
modules/plugins/mini/notify/default.nix
Normal file
6
modules/plugins/mini/notify/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./notify.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
41
modules/plugins/mini/notify/notify.nix
Normal file
41
modules/plugins/mini/notify/notify.nix
Normal file
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption mkOption;
|
||||
inherit (lib.types) int str;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption borderType;
|
||||
|
||||
mkNotifyOpt = name: duration: hl_group: {
|
||||
duration = mkOption {
|
||||
type = int;
|
||||
default = duration;
|
||||
description = "The duration of the ${name} notification";
|
||||
};
|
||||
hl_group = mkOption {
|
||||
type = str;
|
||||
default = hl_group;
|
||||
description = "The highlight group of the ${name} notification";
|
||||
};
|
||||
};
|
||||
in {
|
||||
options.vim.mini.notify = {
|
||||
enable = mkEnableOption "mini.notify";
|
||||
setupOpts = mkPluginSetupOption "mini.notify" {
|
||||
window.config.border = mkOption {
|
||||
type = borderType;
|
||||
default = config.vim.ui.borders.globalStyle;
|
||||
description = "The border type for the mini.notify-notifications";
|
||||
};
|
||||
};
|
||||
notifyOpts = mkPluginSetupOption "mini.notify notifications" {
|
||||
ERROR = mkNotifyOpt "error" 5000 "DiagnosticError";
|
||||
WARN = mkNotifyOpt "warn" 5000 "DiagnosticWarn";
|
||||
INFO = mkNotifyOpt "info" 5000 "DiagnosticInfo";
|
||||
DEBUG = mkNotifyOpt "debug" 0 "DiagnosticHint";
|
||||
TRACE = mkNotifyOpt "trace" 0 "DiagnosticOk";
|
||||
OFF = mkNotifyOpt "off" 0 "MiniNotifyNormal";
|
||||
};
|
||||
};
|
||||
}
|
19
modules/plugins/mini/operators/config.nix
Normal file
19
modules/plugins/mini/operators/config.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.mini.operators;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-operators"];
|
||||
|
||||
pluginRC.mini-operators = entryAnywhere ''
|
||||
require("mini.operators").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/operators/default.nix
Normal file
6
modules/plugins/mini/operators/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./operators.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
13
modules/plugins/mini/operators/operators.nix
Normal file
13
modules/plugins/mini/operators/operators.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.mini.operators = {
|
||||
enable = mkEnableOption "mini.operators";
|
||||
setupOpts = mkPluginSetupOption "mini.operators" {};
|
||||
};
|
||||
}
|
19
modules/plugins/mini/pairs/config.nix
Normal file
19
modules/plugins/mini/pairs/config.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.mini.pairs;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-pairs"];
|
||||
|
||||
pluginRC.mini-pairs = entryAnywhere ''
|
||||
require("mini.pairs").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/pairs/default.nix
Normal file
6
modules/plugins/mini/pairs/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./pairs.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
13
modules/plugins/mini/pairs/pairs.nix
Normal file
13
modules/plugins/mini/pairs/pairs.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.mini.pairs = {
|
||||
enable = mkEnableOption "mini.pairs";
|
||||
setupOpts = mkPluginSetupOption "mini.pairs" {};
|
||||
};
|
||||
}
|
19
modules/plugins/mini/pick/config.nix
Normal file
19
modules/plugins/mini/pick/config.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.mini.pick;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-pick"];
|
||||
|
||||
pluginRC.mini-pick = entryAnywhere ''
|
||||
require("mini.pick").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/pick/default.nix
Normal file
6
modules/plugins/mini/pick/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./pick.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
13
modules/plugins/mini/pick/pick.nix
Normal file
13
modules/plugins/mini/pick/pick.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.mini.pick = {
|
||||
enable = mkEnableOption "mini.pick";
|
||||
setupOpts = mkPluginSetupOption "mini.pick" {};
|
||||
};
|
||||
}
|
19
modules/plugins/mini/sessions/config.nix
Normal file
19
modules/plugins/mini/sessions/config.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkIf;
|
||||
inherit (lib.nvim.dag) entryAnywhere;
|
||||
inherit (lib.nvim.lua) toLuaObject;
|
||||
|
||||
cfg = config.vim.mini.sessions;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-sessions"];
|
||||
|
||||
pluginRC.mini-sessions = entryAnywhere ''
|
||||
require("mini.sessions").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/sessions/default.nix
Normal file
6
modules/plugins/mini/sessions/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./sessions.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
13
modules/plugins/mini/sessions/sessions.nix
Normal file
13
modules/plugins/mini/sessions/sessions.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.options) mkEnableOption;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.mini.sessions = {
|
||||
enable = mkEnableOption "mini.sessions";
|
||||
setupOpts = mkPluginSetupOption "mini.sessions" {};
|
||||
};
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue