2024-10-09 17:50:34 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit (lib.modules) mkIf;
|
|
|
|
|
|
|
|
cfg = config.vim.snippets.luasnip;
|
|
|
|
in {
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
vim = {
|
2025-01-11 13:02:21 +00:00
|
|
|
lazy.plugins.luasnip = {
|
|
|
|
package = "luasnip";
|
2025-01-12 11:48:44 +00:00
|
|
|
|
2025-01-12 08:58:55 +00:00
|
|
|
lazy = true;
|
2025-01-12 11:48:44 +00:00
|
|
|
|
2025-01-11 13:02:21 +00:00
|
|
|
setupModule = "luasnip";
|
|
|
|
inherit (cfg) setupOpts;
|
2025-01-12 11:48:44 +00:00
|
|
|
|
2025-01-12 10:39:41 +00:00
|
|
|
after = cfg.loaders;
|
2024-11-04 15:50:50 +00:00
|
|
|
};
|
|
|
|
startPlugins = cfg.providers;
|
|
|
|
autocomplete.nvim-cmp = {
|
|
|
|
sources = {luasnip = "[LuaSnip]";};
|
|
|
|
sourcePlugins = ["cmp-luasnip"];
|
|
|
|
};
|
2024-10-09 17:50:34 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|