added obsidian plugin

This commit is contained in:
venus
2026-08-14 03:49:32 -05:00
parent 9adc20950f
commit f55b90e55b

View File

@@ -1,36 +1,40 @@
return {
"epwalsh/obsidian.nvim",
version = "*",
version = "*", -- recommended, use latest release instead of latest commit
lazy = true,
ft = "markdown",
-- ft = "markdown",
-- swap event for ft line to load on all markdown files, not just those in the vault
event = {
-- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'.
-- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/*.md"
-- refer to `:h file-pattern` for more examples
"BufReadPre /home/venus/Documents/Notes/*.md",
"BufNewFile /home/venus/Documents/Notes/*.md",
},
dependencies = {
-- Required.
"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
name = "Primay",
path = "~/Notes",
},
{
name = "Old",
path = "~/Documents/Personal-Wiki/",
},
},
-- 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,
daily_notes = {
-- Optional, if you want to change the date format for the ID of daily notes.
date_format = "%Y-%m-%d",
-- Optional, default tags to add to each new daily note created.
default_tags = { "daily" },
-- Optional, if you want to automatically insert a template from your template directory like 'daily.md'
template = "templates/Daily Note.md",
},
completion = {
nvim_cmp = true, -- Set to true if using nvim-cmp
min_chars = 2,
},
}
new_notes_location = "current_dir",
},
}