added obsidian plugin, still not fully functional

This commit is contained in:
venus
2026-07-28 07:53:24 -05:00
parent 634d9250e5
commit 9adc20950f

36
lua/plugins/obsidian.lua Normal file
View File

@@ -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,
},
}
}