Compare commits

...

9 commits

Author SHA1 Message Date
Ching Pei Yang
36fb9c427d
Merge 83a2defebd into 520a06586b 2025-01-12 19:44:00 +01:00
raf
520a06586b
Merge pull request #549 from LilleAila/luasnip-setupOpts
Some checks are pending
Set up binary cache / cachix (default) (push) Waiting to run
Set up binary cache / cachix (maximal) (push) Waiting to run
Set up binary cache / cachix (nix) (push) Waiting to run
Validate flake & check documentation / Validate Flake Documentation (docs) (push) Waiting to run
Validate flake & check documentation / Validate Flake Documentation (docs-html) (push) Waiting to run
Validate flake & check documentation / Validate Flake Documentation (docs-json) (push) Waiting to run
Validate flake & check documentation / Validate Flake Documentation (docs-manpages) (push) Waiting to run
Validate flake & check documentation / Validate hyperlinks in documentation sources (push) Waiting to run
Validate flake & check formatting / Validate Flake (push) Waiting to run
Validate flake & check formatting / Formatting via Alejandra (push) Waiting to run
Build and deploy documentation / Check latest commit (push) Waiting to run
Build and deploy documentation / publish (push) Blocked by required conditions
Check for typos in the source tree / check-typos (push) Waiting to run
snippets/luasnip: add setupOpts
2025-01-12 21:43:55 +03:00
LilleAila
fedbee3a30
snippets/luasnip: fix formatting 2025-01-12 12:48:44 +01:00
LilleAila
607373645f
Merge remote-tracking branch 'upstream/main' into luasnip-setupOpts 2025-01-12 11:40:57 +01:00
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
LilleAila
9818d19937
snippets/luasnip: revert adding lazy event 2025-01-12 09:58:55 +01:00
LilleAila
7012938e21
snippets/luasnip: add changelog entry 2025-01-11 14:06:14 +01:00
LilleAila
69cb99dc2b
snippets/luasnip: add example option to setupOpts 2025-01-11 14:04:40 +01:00
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
3 changed files with 15 additions and 7 deletions

View file

@ -57,4 +57,5 @@
- Remove `vim.notes.obsidian.setupOpts.dir`, which was set by default. Fixes
issue with setting the workspace directory.
- Add `vim.snippets.luasnip.setupOpts`, which was previously missing.
- Add `"prettierd"` as a formatter option in `vim.languages.markdown.format.type`.

View file

@ -9,12 +9,15 @@
in {
config = mkIf cfg.enable {
vim = {
lazy.plugins = {
luasnip = {
package = "luasnip";
lazy = true;
after = cfg.loaders;
};
lazy.plugins.luasnip = {
package = "luasnip";
lazy = true;
setupModule = "luasnip";
inherit (cfg) setupOpts;
after = cfg.loaders;
};
startPlugins = cfg.providers;
autocomplete.nvim-cmp = mkIf config.vim.autocomplete.nvim-cmp.enable {

View file

@ -1,7 +1,7 @@
{lib, ...}: let
inherit (lib.options) mkEnableOption mkOption literalExpression literalMD;
inherit (lib.types) listOf lines;
inherit (lib.nvim.types) pluginType;
inherit (lib.nvim.types) pluginType mkPluginSetupOption;
in {
options.vim.snippets.luasnip = {
enable = mkEnableOption "luasnip";
@ -32,5 +32,9 @@ in {
```
'';
};
setupOpts = mkPluginSetupOption "LuaSnip" {
enable_autosnippets = mkEnableOption "autosnippets";
};
};
}