neovim-flake/modules/plugins/snippets/luasnip/config.nix
2024-12-23 03:06:07 +01:00

26 lines
470 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;
after = cfg.loaders;
};
};
startPlugins = cfg.providers;
autocomplete = {
nvim-cmp.sources = {luasnip = "[LuaSnip]";};
sourcePlugins = ["cmp-luasnip"];
};
};
};
}