Note id as filename #152
utilitron000
started this conversation in
Show and tell
Replies: 1 comment
-
I sorted this out, apologies for the annoyance. For anyone else with my dumb question, this is what worked for me: return {
'epwalsh/obsidian.nvim',
version = '*', -- recommended, use latest release instead of latest commit
lazy = true,
ft = 'markdown',
-- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault:
-- event = {
-- -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'.
-- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/*.md"
-- -- refer to `:h file-pattern` for more examples
-- "BufReadPre path/to/my-vault/*.md",
-- "BufNewFile path/to/my-vault/*.md",
-- },
dependencies = {
-- Required.
'nvim-lua/plenary.nvim',
-- see below for full list of optional dependencies 👇
},
opts = {
notes_subdir = 'Zettelkasten',
new_notes_location = 'notes_subdir',
disable_frontmatter = true,
completion = {
-- Set to false to disable completion.
nvim_cmp = true,
-- Trigger completion at 2 chars.
min_chars = 2,
-- Optional, customize how note file names are generated given the ID, target directory, and title.
---@param spec { id: string, dir: obsidian.Path, title: string|? }
---@return string|obsidian.Path The full path to the new note.
note_path_func = function(spec)
-- This is equivalent to the default behavior.
local path = spec.dir / tostring(spec.id)
return path:with_suffix '.md'
end,
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
📚 The doc issue
I imagine this isn't an issue, I am just a dummy and looking for some guidance as to how to format note titles without the Zettelkasten prefix... I would like my notes to display just the note title as their title.
As is, with the config below, A note is generated with a Zettelkasten prefix and random code, even when a title is specified.
I apologize for the silly question... hoping for an answer if one can be easily given!
Beta Was this translation helpful? Give feedback.
All reactions