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: {
|
extraConfig = cfg: {
|
||||||
warnings = lib.nixvim.mkWarnings "plugins.obsidian" {
|
warnings = lib.nixvim.mkWarnings "plugins.obsidian" [
|
||||||
when = (cfg.settings.completion.nvim_cmp == true) && (!config.plugins.cmp.enable);
|
{
|
||||||
message = ''
|
when = (cfg.settings.completion.nvim_cmp == true) && (!config.plugins.cmp.enable);
|
||||||
You have enabled `completion.nvim_cmp` but `plugins.cmp.enable` is `false`.
|
message = ''
|
||||||
You should probably enable `nvim-cmp`.
|
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`).";
|
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 ''
|
min_chars = defaultNullOpts.mkUnsignedInt 2 ''
|
||||||
Trigger completion at this many chars.
|
Trigger completion at this many chars.
|
||||||
'';
|
'';
|
||||||
|
@ -263,6 +267,7 @@ in
|
||||||
"telescope.nvim"
|
"telescope.nvim"
|
||||||
"fzf-lua"
|
"fzf-lua"
|
||||||
"mini.pick"
|
"mini.pick"
|
||||||
|
"snacks.pick"
|
||||||
])
|
])
|
||||||
''
|
''
|
||||||
Set your preferred picker.
|
Set your preferred picker.
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
new_notes_location = "current_dir";
|
new_notes_location = "current_dir";
|
||||||
completion = {
|
completion = {
|
||||||
nvim_cmp = true;
|
nvim_cmp = true;
|
||||||
|
blink = false;
|
||||||
min_chars = 2;
|
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 = {
|
complete-example = {
|
||||||
plugins = {
|
plugins = {
|
||||||
cmp.enable = true;
|
cmp.enable = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue