Updated obsidian plugin config

This commit is contained in:
2025-12-09 13:16:07 +00:00
parent cd84a2550e
commit 726a2caec7

View File

@@ -12,17 +12,38 @@ return { -- Non programming quality of life utilities go here
"nvim-telescope/telescope.nvim", "nvim-telescope/telescope.nvim",
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
}, },
opts = { opts = function()
workspaces = { local target_path = vim.fn.expand("~/Documents/Work_Notes/")
{ local workspaces = {}
if vim.fn.isdirectory(target_path) == 1 then
table.insert(workspaces, {
name = "work", name = "work",
path = "~/Documents/Work_Notes/", path = target_path,
})
end
if #workspaces == 0 then
local fallback_path = vim.fn.stdpath("data") .. "/obsidian_fallback"
if vim.fn.isdirectory(fallback_path) == 0 then
vim.fn.mkdir(fallback_path, "p")
end
table.insert(workspaces, {
name = "fallback",
path = fallback_path,
})
vim.notify("Obsidian: 'Work_Notes' not found. Using fallback path.", vim.log.levels.WARN)
end
return {
workspaces = workspaces,
completion = {
min_chars = 2,
}, },
}, }
completion = { end,
min_chars = 2,
},
},
}, },
{ {
"MeanderingProgrammer/render-markdown.nvim", "MeanderingProgrammer/render-markdown.nvim",