plugins/obsidian: adapt options (now using the obsidian-nvim community fork)

This commit is contained in:
Gaetan Lepage 2025-03-24 09:13:18 +01:00 committed by Gaétan Lepage
parent db01a0dd97
commit c9597b37d8
3 changed files with 44 additions and 7 deletions

View file

@ -88,12 +88,21 @@ lib.nixvim.plugins.mkNeovimPlugin {
};
extraConfig = cfg: {
warnings = lib.nixvim.mkWarnings "plugins.obsidian" {
when = (cfg.settings.completion.nvim_cmp == true) && (!config.plugins.cmp.enable);
message = ''
You have enabled `completion.nvim_cmp` but `plugins.cmp.enable` is `false`.
You should probably enable `nvim-cmp`.
'';
};
warnings = lib.nixvim.mkWarnings "plugins.obsidian" [
{
when = (cfg.settings.completion.nvim_cmp == true) && (!config.plugins.cmp.enable);
message = ''
You have enabled `completion.nvim_cmp` but `plugins.cmp.enable` is `false`.
You should probably enable `nvim-cmp`.
'';
}
{
when = (cfg.settings.completion.blink == true) && (!config.plugins.blink-cmp.enable);
message = ''
You have enabled `completion.blink` but `plugins.blink-cmp.enable` is `false`.
You should probably enable `blink-cmp`.
'';
}
];
};
}

View file

@ -215,6 +215,10 @@ in
defaultText = lib.literalMD "`true` if `plugins.cmp.enable` is enabled (otherwise `null`).";
};
blink = defaultNullOpts.mkBool false ''
Enable completion using blink.cmp.
'';
min_chars = defaultNullOpts.mkUnsignedInt 2 ''
Trigger completion at this many chars.
'';
@ -263,6 +267,7 @@ in
"telescope.nvim"
"fzf-lua"
"mini.pick"
"snacks.pick"
])
''
Set your preferred picker.