utiltiy/snacks-nvim: init module (#712)
Some checks are pending
Set up binary cache / cachix (default) (push) Waiting to run
Set up binary cache / cachix (maximal) (push) Waiting to run
Set up binary cache / cachix (nix) (push) Waiting to run
Validate flake & check documentation / Validate Flake Documentation (push) Waiting to run
Validate flake & check documentation / Validate hyperlinks in documentation sources (push) Waiting to run
Validate flake & check formatting / Validate Flake (push) Waiting to run
Validate flake & check formatting / Formatting via Alejandra (push) Waiting to run
Build and deploy documentation / Check latest commit (push) Waiting to run
Build and deploy documentation / publish (push) Blocked by required conditions
Check for typos in the source tree / check-typos (push) Waiting to run

This commit is contained in:
raf 2025-03-16 22:50:05 +00:00 committed by GitHub
parent dc2a38f273
commit cacbac08fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 52 additions and 6 deletions

View file

@ -13,6 +13,7 @@
[render-markdown.nvim]: https://github.com/MeanderingProgrammer/render-markdown.nvim
[yanky.nvim]: https://github.com/gbprod/yanky.nvim
[yazi.nvim]: https://github.com/mikavilpas/yazi.nvim
[snacks.nvim]: https://github.com/folke/snacks.nvim
- Add [typst-preview.nvim] under
`languages.typst.extensions.typst-preview-nvim`.
@ -62,6 +63,9 @@
- Add [yazi.nvim] as a companion plugin for Yazi, the terminal file manager.
- Add [snacks.nvim] under `vim.utility.snacks-nvim` as a general-purpose utility
plugin.
[amadaluzia](https://github.com/amadaluzia):
[haskell-tools.nvim]: https://github.com/MrcJkb/haskell-tools.nvim

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" {};
};
}

View file

@ -1989,16 +1989,19 @@
"hash": "0k1xnyvblshn4fhbxgl0i34j22n55xlwr09sdmb23l57br5rb07q"
},
"snacks-nvim": {
"type": "Git",
"type": "GitRelease",
"repository": {
"type": "GitHub",
"owner": "folke",
"repo": "snacks.nvim"
},
"branch": "main",
"revision": "bc0630e43be5699bb94dadc302c0d21615421d93",
"url": "https://github.com/folke/snacks.nvim/archive/bc0630e43be5699bb94dadc302c0d21615421d93.tar.gz",
"hash": "0a5nw7xa33shag1h12gf930g3vcixbwk8dxv0ji4980ycskh238v"
"pre_releases": false,
"version_upper_bound": null,
"release_prefix": null,
"version": "v2.22.0",
"revision": "5eac729fa290248acfe10916d92a5ed5e5c0f9ed",
"url": "https://api.github.com/repos/folke/snacks.nvim/tarball/v2.22.0",
"hash": "1hbm4fnw51qdp0nz83fcxbvnxjq2k57a37w6dp0wz6wkcx7cwxw9"
},
"sqls-nvim": {
"type": "Git",
@ -2218,4 +2221,4 @@
}
},
"version": 3
}
}