From 9adc20950fe14d5f61d41044057cec7ade466f14 Mon Sep 17 00:00:00 2001 From: venus Date: Tue, 28 Jul 2026 07:53:24 -0500 Subject: [PATCH] added obsidian plugin, still not fully functional --- lua/plugins/obsidian.lua | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 lua/plugins/obsidian.lua diff --git a/lua/plugins/obsidian.lua b/lua/plugins/obsidian.lua new file mode 100644 index 0000000..32d0ac9 --- /dev/null +++ b/lua/plugins/obsidian.lua @@ -0,0 +1,36 @@ +return { + "epwalsh/obsidian.nvim", + version = "*", + lazy = true, + ft = "markdown", + dependencies = { + "nvim-lua/plenary.nvim", + "nvim-telescope/telescope.nvim", + "nvim-treesitter/nvim-treesitter", + }, + opts = { + workspaces = { + { + name = "main", + path = "~/Notes", -- Update this to your vault's absolute path + }, + }, + -- Optional: Configure how new notes are named automatically + note_id_func = function(title) + local suffix = "" + if title ~= nil then + suffix = title:gsub(" ", "-"):gsub("[^A-Za-z0-9-]", ""):lower() + else + for _ = 1, 4 do suffix = suffix .. string.char(math.random(65, 90)) end + end + return tostring(os.time()) .. "-" .. suffix + end, + ui = { + enable = true, + }, + completion = { + nvim_cmp = true, -- Set to true if using nvim-cmp + min_chars = 2, + }, + } +}