utiltiy/snacks-nvim: init module

This commit is contained in:
raf 2025-03-16 19:40:58 +03:00
commit 09bd14c3e8
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
6 changed files with 52 additions and 6 deletions

View file

@ -17,6 +17,7 @@
./nix-develop
./outline
./preview
./snacks-nvim
./surround
./telescope
./wakatime

View file

@ -0,0 +1,20 @@
{
config,
lib,
...
}: let
inherit (lib.modules) mkIf;
inherit (lib.nvim.lua) toLuaObject;
inherit (lib.nvim.dag) entryAnywhere;
cfg = config.vim.utility.snacks-nvim;
in {
config = mkIf cfg.enable {
vim = {
startPlugins = ["snacks-nvim"];
pluginRC.snacks-nvim = entryAnywhere ''
require("snacks").setup(${toLuaObject cfg.setupOpts});
'';
};
};
}

View file

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

View file

@ -0,0 +1,12 @@
{lib, ...}: let
inherit (lib.options) mkEnableOption;
inherit (lib.nvim.types) mkPluginSetupOption;
in {
options.vim.utility.snacks-nvim = {
enable = mkEnableOption ''
collection of QoL plugins for Neovim [snacks-nvim]
'';
setupOpts = mkPluginSetupOption "snacks-nvim" {};
};
}