HASH acb87b6bb1a4
DATE 2025-01-07
SUBJECT neovim: add extended obsidian plugin module
FILES 14 CHANGED HASH acb87b6bb1a4
DATE 2025-01-07
SUBJECT neovim: add extended obsidian plugin
module
FILES 14 CHANGED ┌─ outputs/pkgs/ook-vim/config/default.nix ───────────────────────────────── [ COPY ] ─┐
│ diff --git a/outputs/pkgs/ook-vim/config/default.nix b/outputs/pkgs/ook-vim/config │
│ /default.nix │
│ index 93fee2d..7fb6b10 100644 │
│ --- a/outputs/pkgs/ook-vim/config/default.nix │
│ +++ b/outputs/pkgs/ook-vim/config/default.nix │
│ @@ -5,6 +5,5 @@ │
│ ./theme.nix │
│ ./keymaps.nix │
│ ./plugins │
│ - ./modules │
│ ]; │
│ } │
└────────────────────────────────────────────────────────────────────────────────────┘ ┌─ ...gs/ook-vim/config/default.nix ── [ COPY ] ─┐
│ diff --git a/outputs/pkgs/ook-vim/config/def │
│ ault.nix b/outputs/pkgs/ook-vim/config/defau │
│ lt.nix │
│ index 93fee2d..7fb6b10 100644 │
│ --- a/outputs/pkgs/ook-vim/config/default.ni │
│ x │
│ +++ b/outputs/pkgs/ook-vim/config/default.ni │
│ x │
│ @@ -5,6 +5,5 @@ │
│ ./theme.nix │
│ ./keymaps.nix │
│ ./plugins │
│ - ./modules │
│ ]; │
│ } │
└──────────────────────────────────────────────┘ ┌─ outputs/pkgs/ook-vim/config/modules/plugins/obsidian/config.nix ───────── [ COPY ] ─┐
│ diff --git a/outputs/pkgs/ook-vim/config/modules/plugins/obsidian/config.nix b/out │
│ puts/pkgs/ook-vim/config/modules/plugins/obsidian/config.nix │
│ deleted file mode 100644 │
│ index 4a47bea..0000000 │
│ --- a/outputs/pkgs/ook-vim/config/modules/plugins/obsidian/config.nix │
│ +++ /dev/null │
│ @@ -1,21 +0,0 @@ │
│ -{ │
│ - config, │
│ - lib, │
│ - options, │
│ - ... │
│ -}: let │
│ - inherit (lib) mkIf; │
│ - inherit (lib.nvim.binds) mkKeymap; │
│ - inherit (options.vim.notes.obsidian) mappings; │
│ - │
│ - cfg = config.vim.notes.obsidian; │
│ - keys = cfg.mappings; │
│ -in { │
│ - config = mkIf cfg.enable { │
│ - vim = { │
│ - keymaps = [ │
│ - (mkKeymap "n" keys.openNote "<cmd>ObsidianOpen<CR>" {desc = mappings.open │
│ Note.description;}) │
│ - ]; │
│ - }; │
│ - }; │
│ -} │
└────────────────────────────────────────────────────────────────────────────────────┘ ┌─ ...s/plugins/obsidian/config.nix ── [ COPY ] ─┐
│ diff --git a/outputs/pkgs/ook-vim/config/mod │
│ ules/plugins/obsidian/config.nix b/outputs/p │
│ kgs/ook-vim/config/modules/plugins/obsidian/ │
│ config.nix │
│ deleted file mode 100644 │
│ index 4a47bea..0000000 │
│ --- a/outputs/pkgs/ook-vim/config/modules/pl │
│ ugins/obsidian/config.nix │
│ +++ /dev/null │
│ @@ -1,21 +0,0 @@ │
│ -{ │
│ - config, │
│ - lib, │
│ - options, │
│ - ... │
│ -}: let │
│ - inherit (lib) mkIf; │
│ - inherit (lib.nvim.binds) mkKeymap; │
│ - inherit (options.vim.notes.obsidian) mapp │
│ ings; │
│ - │
│ - cfg = config.vim.notes.obsidian; │
│ - keys = cfg.mappings; │
│ -in { │
│ - config = mkIf cfg.enable { │
│ - vim = { │
│ - keymaps = [ │
│ - (mkKeymap "n" keys.openNote "<cmd>O │
│ bsidianOpen<CR>" {desc = mappings.openNote.d │
│ escription;}) │
│ - ]; │
│ - }; │
│ - }; │
│ -} │
└──────────────────────────────────────────────┘ ┌─ outputs/pkgs/ook-vim/config/modules/plugins/obsidian/obsidian.nix ─────── [ COPY ] ─┐
│ diff --git a/outputs/pkgs/ook-vim/config/modules/plugins/obsidian/obsidian.nix b/o │
│ utputs/pkgs/ook-vim/config/modules/plugins/obsidian/obsidian.nix │
│ deleted file mode 100644 │
│ index 089f5e1..0000000 │
│ --- a/outputs/pkgs/ook-vim/config/modules/plugins/obsidian/obsidian.nix │
│ +++ /dev/null │
│ @@ -1,9 +0,0 @@ │
│ -{lib, ...}: let │
│ - inherit (lib.nvim.binds) mkMappingOption; │
│ -in { │
│ - options.vim.notes.obsidian = { │
│ - mappings = { │
│ - openNote = mkMappingOption "Open obsidian note" "<leader>oo"; │
│ - }; │
│ - }; │
│ -} │
└────────────────────────────────────────────────────────────────────────────────────┘ ┌─ ...plugins/obsidian/obsidian.nix ── [ COPY ] ─┐
│ diff --git a/outputs/pkgs/ook-vim/config/mod │
│ ules/plugins/obsidian/obsidian.nix b/outputs │
│ /pkgs/ook-vim/config/modules/plugins/obsidia │
│ n/obsidian.nix │
│ deleted file mode 100644 │
│ index 089f5e1..0000000 │
│ --- a/outputs/pkgs/ook-vim/config/modules/pl │
│ ugins/obsidian/obsidian.nix │
│ +++ /dev/null │
│ @@ -1,9 +0,0 @@ │
│ -{lib, ...}: let │
│ - inherit (lib.nvim.binds) mkMappingOption; │
│ -in { │
│ - options.vim.notes.obsidian = { │
│ - mappings = { │
│ - openNote = mkMappingOption "Open obsi │
│ dian note" "<leader>oo"; │
│ - }; │
│ - }; │
│ -} │
└──────────────────────────────────────────────┘ ┌─ outputs/pkgs/ook-vim/config/plugins/notes.nix ─────────────────────────── [ COPY ] ─┐
│ diff --git a/outputs/pkgs/ook-vim/config/plugins/notes.nix b/outputs/pkgs/ook-vim/ │
│ config/plugins/notes.nix │
│ index 4fde8ec..ef417de 100644 │
│ --- a/outputs/pkgs/ook-vim/config/plugins/notes.nix │
│ +++ b/outputs/pkgs/ook-vim/config/plugins/notes.nix │
│ @@ -1,10 +1,17 @@ │
│ { │
│ vim = { │
│ notes = { │
│ - obsidian = { │
│ + obsidianExtended = { │
│ enable = true; │
│ setupOpts = { │
│ dir = "~/Documents/notes"; │
│ + daily_notes = { │
│ + folder = "~/Documents/notes/dailies"; │
│ + }; │
│ + templates = { │
│ + folder = "~/Documents/notes/templates"; │
│ + }; │
│ + ui.enable = false; │
│ }; │
│ }; │
│ }; │
└────────────────────────────────────────────────────────────────────────────────────┘ ┌─ ...-vim/config/plugins/notes.nix ── [ COPY ] ─┐
│ diff --git a/outputs/pkgs/ook-vim/config/plu │
│ gins/notes.nix b/outputs/pkgs/ook-vim/config │
│ /plugins/notes.nix │
│ index 4fde8ec..ef417de 100644 │
│ --- a/outputs/pkgs/ook-vim/config/plugins/no │
│ tes.nix │
│ +++ b/outputs/pkgs/ook-vim/config/plugins/no │
│ tes.nix │
│ @@ -1,10 +1,17 @@ │
│ { │
│ vim = { │
│ notes = { │
│ - obsidian = { │
│ + obsidianExtended = { │
│ enable = true; │
│ setupOpts = { │
│ dir = "~/Documents/notes"; │
│ + daily_notes = { │
│ + folder = "~/Documents/notes/dai │
│ lies"; │
│ + }; │
│ + templates = { │
│ + folder = "~/Documents/notes/tem │
│ plates"; │
│ + }; │
│ + ui.enable = false; │
│ }; │
│ }; │
│ }; │
└──────────────────────────────────────────────┘ ┌─ outputs/pkgs/ook-vim/default.nix ──────────────────────────────────────── [ COPY ] ─┐
│ diff --git a/outputs/pkgs/ook-vim/default.nix b/outputs/pkgs/ook-vim/default.nix │
│ index 9bcc5ed..40ad2fa 100644 │
│ --- a/outputs/pkgs/ook-vim/default.nix │
│ +++ b/outputs/pkgs/ook-vim/default.nix │
│ @@ -3,11 +3,13 @@ │
│ pkgs, │
│ ... │
│ }: let │
│ - configuration = import ./config; │
│ ooks-vim = inputs.nvf.lib.neovimConfiguration { │
│ inherit pkgs; │
│ extraSpecialArgs = {inherit inputs;}; │
│ - modules = [configuration]; │
│ + modules = [ │
│ + ./config │
│ + ./modules │
│ + ]; │
│ }; │
│ in │
│ ooks-vim.neovim │
└────────────────────────────────────────────────────────────────────────────────────┘ ┌─ outputs/pkgs/ook-vim/default.nix ── [ COPY ] ─┐
│ diff --git a/outputs/pkgs/ook-vim/default.ni │
│ x b/outputs/pkgs/ook-vim/default.nix │
│ index 9bcc5ed..40ad2fa 100644 │
│ --- a/outputs/pkgs/ook-vim/default.nix │
│ +++ b/outputs/pkgs/ook-vim/default.nix │
│ @@ -3,11 +3,13 @@ │
│ pkgs, │
│ ... │
│ }: let │
│ - configuration = import ./config; │
│ ooks-vim = inputs.nvf.lib.neovimConfigura │
│ tion { │
│ inherit pkgs; │
│ extraSpecialArgs = {inherit inputs;}; │
│ - modules = [configuration]; │
│ + modules = [ │
│ + ./config │
│ + ./modules │
│ + ]; │
│ }; │
│ in │
│ ooks-vim.neovim │
└──────────────────────────────────────────────┘ ┌─ outputs/pkgs/ook-vim/modules/default.nix ──────────────────────────────── [ COPY ] ─┐
│ diff --git a/outputs/pkgs/ook-vim/config/modules/default.nix b/outputs/pkgs/ook-vi │
│ m/modules/default.nix │
│ similarity index 100% │
│ rename from outputs/pkgs/ook-vim/config/modules/default.nix │
│ rename to outputs/pkgs/ook-vim/modules/default.nix │
└────────────────────────────────────────────────────────────────────────────────────┘ ┌─ ...s/ook-vim/modules/default.nix ── [ COPY ] ─┐
│ diff --git a/outputs/pkgs/ook-vim/config/mod │
│ ules/default.nix b/outputs/pkgs/ook-vim/modu │
│ les/default.nix │
│ similarity index 100% │
│ rename from outputs/pkgs/ook-vim/config/modu │
│ les/default.nix │
│ rename to outputs/pkgs/ook-vim/modules/defau │
│ lt.nix │
└──────────────────────────────────────────────┘ ┌─ outputs/pkgs/ook-vim/modules/plugins/default.nix ──────────────────────── [ COPY ] ─┐
│ diff --git a/outputs/pkgs/ook-vim/config/modules/plugins/default.nix b/outputs/pkg │
│ s/ook-vim/modules/plugins/default.nix │
│ similarity index 100% │
│ rename from outputs/pkgs/ook-vim/config/modules/plugins/default.nix │
│ rename to outputs/pkgs/ook-vim/modules/plugins/default.nix │
└────────────────────────────────────────────────────────────────────────────────────┘ ┌─ ...m/modules/plugins/default.nix ── [ COPY ] ─┐
│ diff --git a/outputs/pkgs/ook-vim/config/mod │
│ ules/plugins/default.nix b/outputs/pkgs/ook- │
│ vim/modules/plugins/default.nix │
│ similarity index 100% │
│ rename from outputs/pkgs/ook-vim/config/modu │
│ les/plugins/default.nix │
│ rename to outputs/pkgs/ook-vim/modules/plugi │
│ ns/default.nix │
└──────────────────────────────────────────────┘ ┌─ outputs/pkgs/ook-vim/modules/plugins/gruvbox-material/config.nix ──────── [ COPY ] ─┐
│ diff --git a/outputs/pkgs/ook-vim/config/modules/plugins/gruvbox-material/config.n │
│ ix b/outputs/pkgs/ook-vim/modules/plugins/gruvbox-material/config.nix │
│ similarity index 100% │
│ rename from outputs/pkgs/ook-vim/config/modules/plugins/gruvbox-material/config.ni │
│ x │
│ rename to outputs/pkgs/ook-vim/modules/plugins/gruvbox-material/config.nix │
└────────────────────────────────────────────────────────────────────────────────────┘ ┌─ ...s/gruvbox-material/config.nix ── [ COPY ] ─┐
│ diff --git a/outputs/pkgs/ook-vim/config/mod │
│ ules/plugins/gruvbox-material/config.nix b/o │
│ utputs/pkgs/ook-vim/modules/plugins/gruvbox- │
│ material/config.nix │
│ similarity index 100% │
│ rename from outputs/pkgs/ook-vim/config/modu │
│ les/plugins/gruvbox-material/config.nix │
│ rename to outputs/pkgs/ook-vim/modules/plugi │
│ ns/gruvbox-material/config.nix │
└──────────────────────────────────────────────┘ ┌─ outputs/pkgs/ook-vim/modules/plugins/gruvbox-material/default.nix ─────── [ COPY ] ─┐
│ diff --git a/outputs/pkgs/ook-vim/config/modules/plugins/gruvbox-material/default. │
│ nix b/outputs/pkgs/ook-vim/modules/plugins/gruvbox-material/default.nix │
│ similarity index 100% │
│ rename from outputs/pkgs/ook-vim/config/modules/plugins/gruvbox-material/default.n │
│ ix │
│ rename to outputs/pkgs/ook-vim/modules/plugins/gruvbox-material/default.nix │
└────────────────────────────────────────────────────────────────────────────────────┘ ┌─ .../gruvbox-material/default.nix ── [ COPY ] ─┐
│ diff --git a/outputs/pkgs/ook-vim/config/mod │
│ ules/plugins/gruvbox-material/default.nix b/ │
│ outputs/pkgs/ook-vim/modules/plugins/gruvbox │
│ -material/default.nix │
│ similarity index 100% │
│ rename from outputs/pkgs/ook-vim/config/modu │
│ les/plugins/gruvbox-material/default.nix │
│ rename to outputs/pkgs/ook-vim/modules/plugi │
│ ns/gruvbox-material/default.nix │
└──────────────────────────────────────────────┘ ┌─ outputs/pkgs/ook-vim/modules/plugins/obsidian/config.nix ──────────────── [ COPY ] ─┐
│ diff --git a/outputs/pkgs/ook-vim/modules/plugins/obsidian/config.nix b/outputs/pk │
│ gs/ook-vim/modules/plugins/obsidian/config.nix │
│ new file mode 100644 │
│ index 0000000..da7ee0f │
│ --- /dev/null │
│ +++ b/outputs/pkgs/ook-vim/modules/plugins/obsidian/config.nix │
│ @@ -0,0 +1,37 @@ │
│ +{ │
│ + config, │
│ + lib, │
│ + options, │
│ + ... │
│ +}: let │
│ + inherit (lib.modules) mkIf; │
│ + inherit (lib.nvim.dag) entryAnywhere; │
│ + inherit (lib.nvim.lua) toLuaObject; │
│ + inherit (lib.nvim.binds) mkKeymap pushDownDefault; │
│ + inherit (options.vim.notes.obsidianExtended) mappings; │
│ + │
│ + cfg = config.vim.notes.obsidianExtended; │
│ + keys = cfg.mappings; │
│ +in { │
│ + config = mkIf cfg.enable { │
│ + vim = { │
│ + startPlugins = [ │
│ + "obsidian-nvim" │
│ + "vim-markdown" │
│ + "tabular" │
│ + ]; │
│ + │
│ + binds.whichKey.register = pushDownDefault { │
│ + "<leader>o" = "+Notes"; │
│ + }; │
│ + │
│ + pluginRC.obsidian = entryAnywhere '' │
│ + require("obsidian").setup(${toLuaObject cfg.setupOpts}) │
│ + ''; │
│ + keymaps = [ │
│ + (mkKeymap "n" keys.openNote "<cmd>ObsidianOpen<CR>" {desc = mappings.open │
│ Note.description;}) │
│ + (mkKeymap "n" keys.findNote "<cmd>ObsidianQuickSwitch<CR>" {desc = mappin │
│ gs.findNote.description;}) │
│ + ]; │
│ + }; │
│ + }; │
│ +} │
└────────────────────────────────────────────────────────────────────────────────────┘ ┌─ ...s/plugins/obsidian/config.nix ── [ COPY ] ─┐
│ diff --git a/outputs/pkgs/ook-vim/modules/pl │
│ ugins/obsidian/config.nix b/outputs/pkgs/ook │
│ -vim/modules/plugins/obsidian/config.nix │
│ new file mode 100644 │
│ index 0000000..da7ee0f │
│ --- /dev/null │
│ +++ b/outputs/pkgs/ook-vim/modules/plugins/o │
│ bsidian/config.nix │
│ @@ -0,0 +1,37 @@ │
│ +{ │
│ + config, │
│ + lib, │
│ + options, │
│ + ... │
│ +}: let │
│ + inherit (lib.modules) mkIf; │
│ + inherit (lib.nvim.dag) entryAnywhere; │
│ + inherit (lib.nvim.lua) toLuaObject; │
│ + inherit (lib.nvim.binds) mkKeymap pushDow │
│ nDefault; │
│ + inherit (options.vim.notes.obsidianExtend │
│ ed) mappings; │
│ + │
│ + cfg = config.vim.notes.obsidianExtended; │
│ + keys = cfg.mappings; │
│ +in { │
│ + config = mkIf cfg.enable { │
│ + vim = { │
│ + startPlugins = [ │
│ + "obsidian-nvim" │
│ + "vim-markdown" │
│ + "tabular" │
│ + ]; │
│ + │
│ + binds.whichKey.register = pushDownDef │
│ ault { │
│ + "<leader>o" = "+Notes"; │
│ + }; │
│ + │
│ + pluginRC.obsidian = entryAnywhere '' │
│ + require("obsidian").setup(${toLuaOb │
│ ject cfg.setupOpts}) │
│ + ''; │
│ + keymaps = [ │
│ + (mkKeymap "n" keys.openNote "<cmd>O │
│ bsidianOpen<CR>" {desc = mappings.openNote.d │
│ escription;}) │
│ + (mkKeymap "n" keys.findNote "<cmd>O │
│ bsidianQuickSwitch<CR>" {desc = mappings.fin │
│ dNote.description;}) │
│ + ]; │
│ + }; │
│ + }; │
│ +} │
└──────────────────────────────────────────────┘ ┌─ outputs/pkgs/ook-vim/modules/plugins/obsidian/default.nix ─────────────── [ COPY ] ─┐
│ diff --git a/outputs/pkgs/ook-vim/config/modules/plugins/obsidian/default.nix b/ou │
│ tputs/pkgs/ook-vim/modules/plugins/obsidian/default.nix │
│ similarity index 100% │
│ rename from outputs/pkgs/ook-vim/config/modules/plugins/obsidian/default.nix │
│ rename to outputs/pkgs/ook-vim/modules/plugins/obsidian/default.nix │
└────────────────────────────────────────────────────────────────────────────────────┘ ┌─ .../plugins/obsidian/default.nix ── [ COPY ] ─┐
│ diff --git a/outputs/pkgs/ook-vim/config/mod │
│ ules/plugins/obsidian/default.nix b/outputs/ │
│ pkgs/ook-vim/modules/plugins/obsidian/defaul │
│ t.nix │
│ similarity index 100% │
│ rename from outputs/pkgs/ook-vim/config/modu │
│ les/plugins/obsidian/default.nix │
│ rename to outputs/pkgs/ook-vim/modules/plugi │
│ ns/obsidian/default.nix │
└──────────────────────────────────────────────┘ ┌─ outputs/pkgs/ook-vim/modules/plugins/obsidian/obsidian.nix ────────────── [ COPY ] ─┐
│ diff --git a/outputs/pkgs/ook-vim/modules/plugins/obsidian/obsidian.nix b/outputs/ │
│ pkgs/ook-vim/modules/plugins/obsidian/obsidian.nix │
│ new file mode 100644 │
│ index 0000000..f406bac │
│ --- /dev/null │
│ +++ b/outputs/pkgs/ook-vim/modules/plugins/obsidian/obsidian.nix │
│ @@ -0,0 +1,90 @@ │
│ +{ │
│ + lib, │
│ + config, │
│ + ... │
│ +}: let │
│ + inherit (lib.options) mkOption mkEnableOption; │
│ + inherit (lib.types) str nullOr bool enum; │
│ + inherit (lib.nvim.binds) mkMappingOption; │
│ + inherit (lib.nvim.types) mkPluginSetupOption; │
│ +in { │
│ + options.vim.notes.obsidianExtended = { │
│ + enable = mkEnableOption "Complementary neovim plugin for Obsidian editor"; │
│ + setupOpts = mkPluginSetupOption "Obsidian.nvim" { │
│ + dir = mkOption { │
│ + type = str; │
│ + default = "~/my-vault"; │
│ + description = "Location of Obsidian vault directory"; │
│ + }; │
│ + daily_notes = { │
│ + folder = mkOption { │
│ + type = nullOr str; │
│ + default = null; │
│ + description = "Directory in which daily notes should be created"; │
│ + }; │
│ + date_format = mkOption { │
│ + type = nullOr str; │
│ + default = null; │
│ + description = "Date format used for creating daily notes"; │
│ + }; │
│ + }; │
│ + completion = { │
│ + nvim_cmp = mkOption { │
│ + # If using nvim-cmp, otherwise set to false │
│ + type = bool; │
│ + description = "If using nvim-cmp, otherwise set to false"; │
│ + default = config.vim.autocomplete.nvim-cmp.enable; │
│ + }; │
│ + }; │
│ + new_notes_location = mkOption { │
│ + type = nullOr (enum ["current_dir" "notes_subdir"]); │
│ + default = null; │
│ + description = '' │
│ + Where to put new notes. Valid options are: │
│ + * "current_dir" - put notes in same directory as current buffer │
│ + * "notes_subdir" - put notes in the default notes subdirectory │
│ + │
│ + default option: "current_dir" │
│ + ''; │
│ + }; │
│ + templates = { │
│ + folder = mkOption { │
│ + type = nullOr str; │
│ + default = null; │
│ + description = "Obsidian templates directory"; │
│ + }; │
│ + date_format = mkOption { │
│ + type = nullOr str; │
│ + default = null; │
│ + description = "Date format used for templates"; │
│ + }; │
│ + time_format = mkOption { │
│ + type = nullOr str; │
│ + default = null; │
│ + description = "Time format used for templates"; │
│ + }; │
│ + }; │
│ + preferred_link_style = mkOption { │
│ + type = nullOr (enum ["wiki" "markdown"]); │
│ + default = null; │
│ + description = '' │
│ + Either "wiki" or "markdown" │
│ + ''; │
│ + }; │
│ + ui = { │
│ + enable = mkOption { │
│ + type = nullOr bool; │
│ + default = null; │
│ + description = '' │
│ + Set to false to disable all additional syntax features │
│ + ''; │
│ + }; │
│ + # TODO: add rest of ui options │
│ + }; │
│ + }; │
│ + mappings = { │
│ + openNote = mkMappingOption "Open note in obsidian" "<leader>oo"; │
│ + findNote = mkMappingOption "Open finder in obsidian vault" "<leader>of"; │
│ + }; │
│ + }; │
│ +} │
└────────────────────────────────────────────────────────────────────────────────────┘ ┌─ ...plugins/obsidian/obsidian.nix ── [ COPY ] ─┐
│ diff --git a/outputs/pkgs/ook-vim/modules/pl │
│ ugins/obsidian/obsidian.nix b/outputs/pkgs/o │
│ ok-vim/modules/plugins/obsidian/obsidian.nix │
│ new file mode 100644 │
│ index 0000000..f406bac │
│ --- /dev/null │
│ +++ b/outputs/pkgs/ook-vim/modules/plugins/o │
│ bsidian/obsidian.nix │
│ @@ -0,0 +1,90 @@ │
│ +{ │
│ + lib, │
│ + config, │
│ + ... │
│ +}: let │
│ + inherit (lib.options) mkOption mkEnableOp │
│ tion; │
│ + inherit (lib.types) str nullOr bool enum; │
│ + inherit (lib.nvim.binds) mkMappingOption; │
│ + inherit (lib.nvim.types) mkPluginSetupOpt │
│ ion; │
│ +in { │
│ + options.vim.notes.obsidianExtended = { │
│ + enable = mkEnableOption "Complementary │
│ neovim plugin for Obsidian editor"; │
│ + setupOpts = mkPluginSetupOption "Obsidi │
│ an.nvim" { │
│ + dir = mkOption { │
│ + type = str; │
│ + default = "~/my-vault"; │
│ + description = "Location of Obsidian │
│ vault directory"; │
│ + }; │
│ + daily_notes = { │
│ + folder = mkOption { │
│ + type = nullOr str; │
│ + default = null; │
│ + description = "Directory in which │
│ daily notes should be created"; │
│ + }; │
│ + date_format = mkOption { │
│ + type = nullOr str; │
│ + default = null; │
│ + description = "Date format used f │
│ or creating daily notes"; │
│ + }; │
│ + }; │
│ + completion = { │
│ + nvim_cmp = mkOption { │
│ + # If using nvim-cmp, otherwise se │
│ t to false │
│ + type = bool; │
│ + description = "If using nvim-cmp, │
│ otherwise set to false"; │
│ + default = config.vim.autocomplete │
│ .nvim-cmp.enable; │
│ + }; │
│ + }; │
│ + new_notes_location = mkOption { │
│ + type = nullOr (enum ["current_dir" │
│ "notes_subdir"]); │
│ + default = null; │
│ + description = '' │
│ + Where to put new notes. Valid opt │
│ ions are: │
│ + * "current_dir" - put notes in sa │
│ me directory as current buffer │
│ + * "notes_subdir" - put notes in t │
│ he default notes subdirectory │
│ + │
│ + default option: "current_dir" │
│ + ''; │
│ + }; │
│ + templates = { │
│ + folder = mkOption { │
│ + type = nullOr str; │
│ + default = null; │
│ + description = "Obsidian templates │
│ directory"; │
│ + }; │
│ + date_format = mkOption { │
│ + type = nullOr str; │
│ + default = null; │
│ + description = "Date format used f │
│ or templates"; │
│ + }; │
│ + time_format = mkOption { │
│ + type = nullOr str; │
│ + default = null; │
│ + description = "Time format used f │
│ or templates"; │
│ + }; │
│ + }; │
│ + preferred_link_style = mkOption { │
│ + type = nullOr (enum ["wiki" "markdo │
│ wn"]); │
│ + default = null; │
│ + description = '' │
│ + Either "wiki" or "markdown" │
│ + ''; │
│ + }; │
│ + ui = { │
│ + enable = mkOption { │
│ + type = nullOr bool; │
│ + default = null; │
│ + description = '' │
│ + Set to false to disable all add │
│ itional syntax features │
│ + ''; │
│ + }; │
│ + # TODO: add rest of ui options │
│ + }; │
│ + }; │
│ + mappings = { │
│ + openNote = mkMappingOption "Open note │
│ in obsidian" "<leader>oo"; │
│ + findNote = mkMappingOption "Open find │
│ er in obsidian vault" "<leader>of"; │
│ + }; │
│ + }; │
│ +} │
└──────────────────────────────────────────────┘ ┌─ outputs/pkgs/ook-vim/modules/plugins/telescope/config.nix ─────────────── [ COPY ] ─┐
│ diff --git a/outputs/pkgs/ook-vim/config/modules/plugins/telescope/config.nix b/ou │
│ tputs/pkgs/ook-vim/modules/plugins/telescope/config.nix │
│ similarity index 100% │
│ rename from outputs/pkgs/ook-vim/config/modules/plugins/telescope/config.nix │
│ rename to outputs/pkgs/ook-vim/modules/plugins/telescope/config.nix │
└────────────────────────────────────────────────────────────────────────────────────┘ ┌─ .../plugins/telescope/config.nix ── [ COPY ] ─┐
│ diff --git a/outputs/pkgs/ook-vim/config/mod │
│ ules/plugins/telescope/config.nix b/outputs/ │
│ pkgs/ook-vim/modules/plugins/telescope/confi │
│ g.nix │
│ similarity index 100% │
│ rename from outputs/pkgs/ook-vim/config/modu │
│ les/plugins/telescope/config.nix │
│ rename to outputs/pkgs/ook-vim/modules/plugi │
│ ns/telescope/config.nix │
└──────────────────────────────────────────────┘ ┌─ outputs/pkgs/ook-vim/modules/plugins/telescope/default.nix ────────────── [ COPY ] ─┐
│ diff --git a/outputs/pkgs/ook-vim/config/modules/plugins/telescope/default.nix b/o │
│ utputs/pkgs/ook-vim/modules/plugins/telescope/default.nix │
│ similarity index 100% │
│ rename from outputs/pkgs/ook-vim/config/modules/plugins/telescope/default.nix │
│ rename to outputs/pkgs/ook-vim/modules/plugins/telescope/default.nix │
└────────────────────────────────────────────────────────────────────────────────────┘ ┌─ ...plugins/telescope/default.nix ── [ COPY ] ─┐
│ diff --git a/outputs/pkgs/ook-vim/config/mod │
│ ules/plugins/telescope/default.nix b/outputs │
│ /pkgs/ook-vim/modules/plugins/telescope/defa │
│ ult.nix │
│ similarity index 100% │
│ rename from outputs/pkgs/ook-vim/config/modu │
│ les/plugins/telescope/default.nix │
│ rename to outputs/pkgs/ook-vim/modules/plugi │
│ ns/telescope/default.nix │
└──────────────────────────────────────────────┘ [ BACK TO LOG ] ──────────────────────────────────────────────────────────────────────────────────────
OOKNET ────────────────────────────────────────────────
OOKNET