with markdown and obsidian
This commit is contained in:
parent
d78e602f0f
commit
5872e327eb
7 changed files with 81 additions and 5 deletions
58
lua/custom/plugins/obsidian.lua
Normal file
58
lua/custom/plugins/obsidian.lua
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
return {
|
||||
"epwalsh/obsidian.nvim",
|
||||
version = "*",
|
||||
lazy = true,
|
||||
ft = "markdown",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("obsidian").setup({
|
||||
workspaces = {
|
||||
{
|
||||
name = "antenando",
|
||||
path = "~/gdrive/DriveSyncFiles/antenando-vault",
|
||||
},
|
||||
},
|
||||
completion = {
|
||||
nvim_cmp = true,
|
||||
min_chars = 2,
|
||||
},
|
||||
new_notes_location = "notes_subdir",
|
||||
note_id_func = function(title)
|
||||
return title
|
||||
end,
|
||||
note_frontmatter_func = function(note)
|
||||
local out = { id = note.id, aliases = note.aliases, tags = note.tags }
|
||||
|
||||
if note.metadata ~= nil and not vim.tbl_isempty(note.metadata) then
|
||||
for k, v in pairs(note.metadata) do
|
||||
out[k] = v
|
||||
end
|
||||
end
|
||||
|
||||
return out
|
||||
end,
|
||||
mappings = {},
|
||||
|
||||
templates = {
|
||||
subdir = "Templates",
|
||||
date_format = "%Y-%m-%d",
|
||||
time_format = "%H:%M",
|
||||
tags = "",
|
||||
substitutions = {
|
||||
yesterday = function()
|
||||
return os.date("%Y-%m-%d", os.time() - 86400)
|
||||
end,
|
||||
tomorrow = function()
|
||||
return os.date("%Y-%m-%d", os.time() + 86400)
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
ui = {
|
||||
enable = true,
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue