1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-29 21:51:03 +01:00

plugins/obsidian: drop settings options declarations

This commit is contained in:
Gaetan Lepage 2025-10-12 21:40:09 +02:00 committed by Gaétan Lepage
parent 1c3c90e85c
commit a830246ed9
2 changed files with 3 additions and 636 deletions

View file

@ -1,65 +1,14 @@
{
lib,
helpers,
config,
...
}:
with lib;
lib.nixvim.plugins.mkNeovimPlugin {
name = "obsidian";
package = "obsidian-nvim";
description = "Neovim plugin for writing and navigating Obsidian vaults.";
maintainers = [ maintainers.GaetanLepage ];
settingsOptions =
let
opts = import ./settings-options.nix { inherit lib; };
in
{
dir = helpers.mkNullOrOption types.str ''
Alternatively to `workspaces` - and for backwards compatibility - you can set `dir` to a
single path instead of `workspaces`.
For example:
```nix
dir = "~/vaults/work";
```
'';
workspaces =
helpers.defaultNullOpts.mkNullable
(
with types;
listOf (
types.submodule {
options = {
name = mkOption {
type = with lib.types; maybeRaw str;
description = "The name for this workspace";
};
path = mkOption {
type = with lib.types; maybeRaw str;
description = "The path of the workspace.";
};
overrides = opts;
};
}
)
)
[ ]
''
A list of vault names and paths.
Each path should be the path to the vault root.
If you use the Obsidian app, the vault root is the parent directory of the `.obsidian`
folder.
You can also provide configuration overrides for each workspace through the `overrides`
field.
'';
}
// opts;
maintainers = [ lib.maintainers.GaetanLepage ];
settingsExample = {
workspaces = [
@ -82,14 +31,14 @@ lib.nixvim.plugins.mkNeovimPlugin {
extraConfig = cfg: {
warnings = lib.nixvim.mkWarnings "plugins.obsidian" [
{
when = (cfg.settings.completion.nvim_cmp == true) && (!config.plugins.cmp.enable);
when = ((cfg.settings.completion.nvim_cmp or false) == 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);
when = ((cfg.settings.completion.blink or false) == 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`.