| 1 | return { |
| 2 | "epwalsh/obsidian.nvim", |
| 3 | version = "*", -- recommended, use latest release instead of latest commit |
| 4 | lazy = false, |
| 5 | -- ft = "markdown", |
| 6 | -- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault: |
| 7 | -- event = { |
| 8 | -- -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'. |
| 9 | -- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/*.md" |
| 10 | -- -- refer to `:h file-pattern` for more examples |
| 11 | -- "BufReadPre path/to/my-vault/*.md", |
| 12 | -- "BufNewFile path/to/my-vault/*.md", |
| 13 | -- }, |
| 14 | dependencies = { |
| 15 | -- Required. |
| 16 | "nvim-lua/plenary.nvim", |
| 17 | |
| 18 | -- see below for full list of optional dependencies 👇 |
| 19 | }, |
| 20 | opts = { |
| 21 | workspaces = { |
| 22 | { |
| 23 | name = "Brain", |
| 24 | path = "~/dox/brain", |
| 25 | overrides = { |
| 26 | disable_frontmatter = true, |
| 27 | } |
| 28 | }, |
| 29 | { |
| 30 | name = "no-vault", |
| 31 | path = function() |
| 32 | -- alternatively use the CWD: |
| 33 | -- return assert(vim.fn.getcwd()) |
| 34 | return assert(vim.fs.dirname(vim.api.nvim_buf_get_name(0))) |
| 35 | end, |
| 36 | overrides = { |
| 37 | notes_subdir = vim.NIL, -- have to use 'vim.NIL' instead of 'nil' |
| 38 | new_notes_location = "current_dir", |
| 39 | templates = { |
| 40 | folder = vim.NIL, |
| 41 | }, |
| 42 | disable_frontmatter = true, |
| 43 | }, |
| 44 | }, |
| 45 | }, |
| 46 | |
| 47 | templates = { |
| 48 | folder = "99 - Meta/Templates", |
| 49 | date_format = "%Y-%m-%d-%a", |
| 50 | time_format = "%H:%M", |
| 51 | }, |
| 52 | -- see below for full list of options 👇 |
| 53 | }, |
| 54 | } |