fix obsidian config

This commit is contained in:
Adi De Masi 2026-01-23 08:41:40 +01:00
parent 2c88e3186f
commit 4f2315f832
1 changed files with 7 additions and 5 deletions

View File

@ -2,11 +2,13 @@ return {
'obsidian-nvim/obsidian.nvim', 'obsidian-nvim/obsidian.nvim',
version = '*', -- use latest release, remove to use latest commit version = '*', -- use latest release, remove to use latest commit
lazy = true, lazy = true,
event = { event = function()
-- If you want to use the home shortcut '~' here, you need to call 'vim.fn.expand'. local vault_path = vim.fn.expand("~/AdisObsidianSyncVault")
"BufReadPre " .. vim.fn.expand "~" .. "/AdisObsidianSyncVault/**.md", return {
"BufNewFile " .. vim.fn.expand "~" .. "/AdisObsidianSyncVault/**.md", "BufReadPre " .. vault_path .. "/**/*.md",
}, "BufNewFile " .. vault_path .. "/**/*.md",
}
end,
dependencies = { dependencies = {
'nvim-lua/plenary.nvim', 'nvim-lua/plenary.nvim',
}, },