add function for new obsidian note id
This commit is contained in:
parent
8c942afe7f
commit
872e0a43c6
1 changed files with 11 additions and 0 deletions
|
|
@ -27,6 +27,17 @@ return {
|
|||
follow_url_func = function(url)
|
||||
vim.fn.jobstart({ "open", url })
|
||||
end,
|
||||
note_id_func = function(title)
|
||||
if title ~= nil then
|
||||
print("create new obsidian note with given title: " .. title)
|
||||
return title
|
||||
end
|
||||
local suffix = ""
|
||||
for _ = 1, 4 do
|
||||
suffix = suffix .. string.char(math.random(65, 90))
|
||||
end
|
||||
return tostring(os.time()) .. "-" .. suffix
|
||||
end,
|
||||
},
|
||||
mappings = {
|
||||
["<CR>"] = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue