nvf/modules/plugins/snippets/luasnip/config.nix
LilleAila c59f8922b2
snippets/luasnip: add whitespace, organize options
Co-authored-by: diniamo <55629891+diniamo@users.noreply.github.com>
2025-01-12 11:39:41 +01:00

30 lines
534 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";
lazy = true;
setupModule = "luasnip";
inherit (cfg) setupOpts;
after = cfg.loaders;
};
startPlugins = cfg.providers;
autocomplete.nvim-cmp = {
sources = {luasnip = "[LuaSnip]";};
sourcePlugins = ["cmp-luasnip"];
};
};
};
}