clone of my dotfiles.ssp.sh
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

add obsidian configs back

sspaeti 4e902e13 3744112b

+57 -11
+57 -11
nvim/lua/sspaeti/plugins/obsidian.lua
··· 1 - 2 1 return { 3 - -- "epwalsh/obsidian.nvim", 4 - -- event = "VeryLazy", --using neovim with the Obsidian vault 5 - -- config = function() 6 - -- require("obsidian").setup({ 7 - -- dir = "$HOME/Simon/Sync/SecondBrain", 8 - -- completion = { 9 - -- nvim_cmp = true, -- if using nvim-cmp, otherwise set to false 10 - -- } 11 - -- }) 12 - -- end 2 + "epwalsh/obsidian.nvim", 3 + version = "*", -- recommended, use latest release instead of latest commit 4 + lazy = true, 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 + -- "BufReadPre path/to/my-vault/**.md", 11 + -- "BufNewFile path/to/my-vault/**.md", 12 + -- }, 13 + dependencies = { 14 + -- Required. 15 + "nvim-lua/plenary.nvim", 16 + 17 + -- see below for full list of optional dependencies 👇 18 + }, 19 + opts = { 20 + workspaces = { 21 + { 22 + name = "personal", 23 + path = "~/Simon/Sync/SecondBrain", 24 + } 25 + -- { 26 + -- name = "work", 27 + -- path = "~/vaults/work", 28 + -- }, 29 + }, 30 + templates = { 31 + --TODO: create dedicated templates for neovim with {date} placeholder instead of Templator syntax 32 + folder = "💡 Resources/🛠 Templates/Markdown/", 33 + date_format = "%Y-%m-%d-%a", 34 + time_format = "%H:%M", 35 + }, 36 + 37 + -- Optional, alternatively you can customize the frontmatter data. 38 + ---@return table 39 + note_frontmatter_func = function(note) 40 + -- Add the title of the note as an alias. 41 + if note.title then 42 + note:add_alias(note.title) 43 + end 44 + 45 + --remove default id, aliases and tags: { id = note.id, aliases = note.aliases, tags = note.tags } 46 + local out = { } 47 + 48 + -- `note.metadata` contains any manually added fields in the frontmatter. 49 + -- So here we just make sure those fields are kept in the frontmatter. 50 + if note.metadata ~= nil and not vim.tbl_isempty(note.metadata) then 51 + for k, v in pairs(note.metadata) do 52 + out[k] = v 53 + end 54 + end 55 + 56 + return out 57 + end, 58 + }, 13 59 }