mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2025-01-18 13:49:49 +01:00
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.
This commit is contained in:
parent
4df1cc3a7f
commit
98a7959047
2 changed files with 9 additions and 7 deletions
|
@ -9,12 +9,12 @@
|
||||||
in {
|
in {
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
vim = {
|
vim = {
|
||||||
lazy.plugins = {
|
lazy.plugins.luasnip = {
|
||||||
luasnip = {
|
package = "luasnip";
|
||||||
package = "luasnip";
|
event = "BufEnter";
|
||||||
lazy = true;
|
after = cfg.loaders;
|
||||||
after = cfg.loaders;
|
setupModule = "luasnip";
|
||||||
};
|
inherit (cfg) setupOpts;
|
||||||
};
|
};
|
||||||
startPlugins = cfg.providers;
|
startPlugins = cfg.providers;
|
||||||
autocomplete.nvim-cmp = {
|
autocomplete.nvim-cmp = {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{lib, ...}: let
|
{lib, ...}: let
|
||||||
inherit (lib.options) mkEnableOption mkOption literalExpression literalMD;
|
inherit (lib.options) mkEnableOption mkOption literalExpression literalMD;
|
||||||
inherit (lib.types) listOf lines;
|
inherit (lib.types) listOf lines;
|
||||||
inherit (lib.nvim.types) pluginType;
|
inherit (lib.nvim.types) pluginType mkPluginSetupOption;
|
||||||
in {
|
in {
|
||||||
options.vim.snippets.luasnip = {
|
options.vim.snippets.luasnip = {
|
||||||
enable = mkEnableOption "luasnip";
|
enable = mkEnableOption "luasnip";
|
||||||
|
@ -32,5 +32,7 @@ in {
|
||||||
```
|
```
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
setupOpts = mkPluginSetupOption "LuaSnip" {};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue