up
This commit is contained in:
68
lua/kickstart/plugins/obsidian.lua
Normal file
68
lua/kickstart/plugins/obsidian.lua
Normal file
@@ -0,0 +1,68 @@
|
||||
-- obsidian
|
||||
-- https://github.com/obsidian-nvim/obsidian.nvim
|
||||
--
|
||||
|
||||
return {
|
||||
'obsidian-nvim/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",
|
||||
-- },
|
||||
---@module 'obsidian'
|
||||
---@type obsidian.config
|
||||
opts = {
|
||||
legacy_commands = false,
|
||||
workspaces = {
|
||||
{
|
||||
name = 'dane',
|
||||
path = '~/Notes/dane',
|
||||
strict = true,
|
||||
},
|
||||
{
|
||||
name = 'travail',
|
||||
path = '~/Notes/travail',
|
||||
strict = true,
|
||||
},
|
||||
|
||||
{
|
||||
name = 'no-vault',
|
||||
path = function()
|
||||
-- alternatively use the CWD:
|
||||
-- return assert(vim.fn.getcwd())
|
||||
return assert(vim.fs.dirname(vim.api.nvim_buf_get_name(0)))
|
||||
end,
|
||||
overrides = {
|
||||
notes_subdir = vim.NIL, -- have to use 'vim.NIL' instead of 'nil'
|
||||
new_notes_location = 'current_dir',
|
||||
templates = {
|
||||
folder = vim.NIL,
|
||||
},
|
||||
disable_frontmatter = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
daily_notes = {
|
||||
-- Optional, if you keep daily notes in a separate directory.
|
||||
folder = 'journal/daily',
|
||||
-- Optional, if you want to change the date format for the ID of daily notes.
|
||||
date_format = '%Y-%m-%d',
|
||||
-- Optional, if you want to change the date format of the default alias of daily notes.
|
||||
alias_format = '%B %-d, %Y',
|
||||
-- Optional, default tags to add to each new daily note created.
|
||||
default_tags = { 'daily-notes' },
|
||||
-- Optional, if you want to automatically insert a template from your template directory like 'daily.md'
|
||||
template = nil,
|
||||
-- Optional, if you want `Obsidian yesterday` to return the last work day or `Obsidian tomorrow` to return the next work day.
|
||||
workdays_only = true,
|
||||
},
|
||||
-- see below for full list of options 👇
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user