From c64a45ac7bdf9186e3f87a341a5f9270fdf84852 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Moritz=20B=C3=B6hme?= Date: Mon, 11 Nov 2024 13:23:21 +0100 Subject: [PATCH] feat(nvim): add obsidian plugin --- modules/programs/nvim/new_plugins/other.nix | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/modules/programs/nvim/new_plugins/other.nix b/modules/programs/nvim/new_plugins/other.nix index e423f4c..7da6805 100644 --- a/modules/programs/nvim/new_plugins/other.nix +++ b/modules/programs/nvim/new_plugins/other.nix @@ -58,6 +58,25 @@ in plugins.helpview.enable = true; performance.combinePlugins.standalonePlugins = [ "helpview.nvim" ]; } + { + plugins.obsidian.enable = true; + plugins.obsidian.settings = { + dir = "~/Documents/Nextcloud/Notes/zettelkasten/"; + note_id_func.__raw = '' + function(title) + if title ~= nil then + return title + else + suffix = "" + for _ = 1, 4 do + suffix = suffix .. string.char(math.random(65, 90)) + end + return tostring(os.date("%Y-%m-%d")) .. "-" .. suffix + end + end + ''; + }; + } ]; }; }