mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-23 22:00:42 +00:00
28 lines
546 B
Nix
28 lines
546 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;
|
|
};
|
|
cmp-luasnip = mkIf config.vim.autocomplete.nvim-cmp.enable {
|
|
package = "cmp-luasnip";
|
|
lazy = true;
|
|
};
|
|
};
|
|
startPlugins = cfg.providers;
|
|
autocomplete.nvim-cmp.sources = {luasnip = "[LuaSnip]";};
|
|
};
|
|
};
|
|
}
|