mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
plugins/obsidian: adapt options (now using the obsidian-nvim community fork)
This commit is contained in:
parent
db01a0dd97
commit
c9597b37d8
3 changed files with 44 additions and 7 deletions
|
@ -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`.
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
new_notes_location = "current_dir";
|
||||
completion = {
|
||||
nvim_cmp = true;
|
||||
blink = false;
|
||||
min_chars = 2;
|
||||
};
|
||||
};
|
||||
|
@ -39,6 +40,28 @@
|
|||
};
|
||||
};
|
||||
|
||||
blink-cmp = {
|
||||
# Issue within the obsidian.nvim plugin itself:
|
||||
# ERROR: cmp.add_provider is deprecated, use cmp.add_source_provider instead.
|
||||
test.runNvim = false;
|
||||
|
||||
plugins = {
|
||||
blink-cmp.enable = true;
|
||||
obsidian = {
|
||||
enable = true;
|
||||
settings = {
|
||||
completion.blink = true;
|
||||
workspaces = [
|
||||
{
|
||||
name = "foo";
|
||||
path = "~/";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
complete-example = {
|
||||
plugins = {
|
||||
cmp.enable = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue