mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-01-19 08:22:25 +00:00
mini/snippets: init
This commit is contained in:
parent
39d8f52f0e
commit
7fc00f75f6
7 changed files with 62 additions and 0 deletions
|
@ -85,6 +85,7 @@
|
|||
- `mini.pairs`
|
||||
- `mini.pick`
|
||||
- `mini.sessions`
|
||||
- `mini.snippets`
|
||||
|
||||
[kaktu5](https://github.com/kaktu5):
|
||||
|
||||
|
|
17
flake.lock
17
flake.lock
|
@ -1432,6 +1432,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"plugin-mini-snippets": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1736611383,
|
||||
"narHash": "sha256-How9m7KTo66FrwjZQlgZRmJ5toFKn/+GnUbx/0va3lM=",
|
||||
"owner": "echasnovski",
|
||||
"repo": "mini.snippets",
|
||||
"rev": "72920f62e3dd1330720e94e8f5d42592f3a1ecf8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "echasnovski",
|
||||
"repo": "mini.snippets",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"plugin-minimap-vim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -2659,6 +2675,7 @@
|
|||
"plugin-mini-pairs": "plugin-mini-pairs",
|
||||
"plugin-mini-pick": "plugin-mini-pick",
|
||||
"plugin-mini-sessions": "plugin-mini-sessions",
|
||||
"plugin-mini-snippets": "plugin-mini-snippets",
|
||||
"plugin-minimap-vim": "plugin-minimap-vim",
|
||||
"plugin-modes-nvim": "plugin-modes-nvim",
|
||||
"plugin-neo-tree-nvim": "plugin-neo-tree-nvim",
|
||||
|
|
|
@ -900,5 +900,10 @@
|
|||
url = "github:echasnovski/mini.sessions";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
plugin-mini-snippets = {
|
||||
url = "github:echasnovski/mini.snippets";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -31,5 +31,6 @@
|
|||
./pairs
|
||||
./pick
|
||||
./sessions
|
||||
./snippets
|
||||
];
|
||||
}
|
||||
|
|
19
modules/plugins/mini/snippets/config.nix
Normal file
19
modules/plugins/mini/snippets/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.snippets;
|
||||
in {
|
||||
vim = mkIf cfg.enable {
|
||||
startPlugins = ["mini-snippets"];
|
||||
|
||||
pluginRC.mini-snippets = entryAnywhere ''
|
||||
require("mini.snippets").setup(${toLuaObject cfg.setupOpts})
|
||||
'';
|
||||
};
|
||||
}
|
6
modules/plugins/mini/snippets/default.nix
Normal file
6
modules/plugins/mini/snippets/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./snippets.nix
|
||||
./config.nix
|
||||
];
|
||||
}
|
13
modules/plugins/mini/snippets/snippets.nix
Normal file
13
modules/plugins/mini/snippets/snippets.nix
Normal 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" {};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue