nvf/modules/plugins/snippets/luasnip/config.nix
LilleAila 98a7959047
snippets/luasnip: add setupOpts
Also fixed a bug where the plugin previously would not get loaded, as
lazy was set to true without a trigger event.
2025-01-11 14:02:21 +01:00

27 lines
514 B
Nix

{
config,
lib,
...
}: let
inherit (lib.modules) mkIf;
cfg = config.vim.snippets.luasnip;
in {
config = mkIf cfg.enable {
vim = {
lazy.plugins.luasnip = {
package = "luasnip";
event = "BufEnter";
after = cfg.loaders;
setupModule = "luasnip";
inherit (cfg) setupOpts;
};
startPlugins = cfg.providers;
autocomplete.nvim-cmp = {
sources = {luasnip = "[LuaSnip]";};
sourcePlugins = ["cmp-luasnip"];
};
};
};
}