mini/snippets: init

This commit is contained in:
LilleAila 2025-01-17 21:10:12 +01:00
commit 7fc00f75f6
No known key found for this signature in database
GPG key ID: D1ACCDCF2B9B9799
7 changed files with 62 additions and 0 deletions

View file

@ -31,5 +31,6 @@
./pairs
./pick
./sessions
./snippets
];
}

View 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.snippets;
in {
vim = mkIf cfg.enable {
startPlugins = ["mini-snippets"];
pluginRC.mini-snippets = entryAnywhere ''
require("mini.snippets").setup(${toLuaObject cfg.setupOpts})
'';
};
}

View file

@ -0,0 +1,6 @@
{
imports = [
./snippets.nix
./config.nix
];
}

View file

@ -0,0 +1,13 @@
{
config,
lib,
...
}: let
inherit (lib.options) mkEnableOption mkOption;
inherit (lib.nvim.types) mkPluginSetupOption;
in {
options.vim.mini.snippets = {
enable = mkEnableOption "mini.snippets";
setupOpts = mkPluginSetupOption "mini.snippets" {};
};
}