Skip to content

Commit

Permalink
u
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbuhr committed Nov 4, 2024
1 parent 85d78c5 commit 8c4ecd9
Showing 1 changed file with 32 additions and 11 deletions.
43 changes: 32 additions & 11 deletions lua/plugins/notes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,49 @@ return {
'nvim-lua/plenary.nvim',
},
keys = {
{ '<leader>nd', ':ObsidianToday<cr>', desc = 'obsidian [d]aily' },
{ '<leader>nt', ':ObsidianToday 1<cr>', desc = 'obsidian [t]omorrow' },
{ '<leader>ny', ':ObsidianToday -1<cr>', desc = 'obsidian [y]esterday' },
{ '<leader>nb', ':ObsidianBacklinks<cr>', desc = 'obsidian [b]acklinks' },
{ '<leader>nl', ':ObsidianLink<cr>', desc = 'obsidian [l]ink selection' },
{ '<leader>nf', ':ObsidianFollowLink<cr>', desc = 'obsidian [f]ollow link' },
{ '<leader>nn', ':ObsidianNew<cr>', desc = 'obsidian [n]ew' },
{ '<leader>ns', ':ObsidianSearch<cr>', desc = 'obsidian [s]earch' },
{ '<leader>nd', ':ObsidianToday<cr>', desc = 'obsidian [d]aily' },
{ '<leader>nt', ':ObsidianToday 1<cr>', desc = 'obsidian [t]omorrow' },
{ '<leader>ny', ':ObsidianToday -1<cr>', desc = 'obsidian [y]esterday' },
{ '<leader>nb', ':ObsidianBacklinks<cr>', desc = 'obsidian [b]acklinks' },
{ '<leader>nl', ':ObsidianLink<cr>', desc = 'obsidian [l]ink selection' },
{ '<leader>nf', ':ObsidianFollowLink<cr>', desc = 'obsidian [f]ollow link' },
{ '<leader>nn', ':ObsidianNew<cr>', desc = 'obsidian [n]ew' },
{ '<leader>ns', ':ObsidianSearch<cr>', desc = 'obsidian [s]earch' },
{ '<leader>no', ':ObsidianQuickSwitch<cr>', desc = 'obsidian [o]pen quickswitch' },
{ '<leader>nO', ':ObsidianOpen<cr>', desc = 'obsidian [O]pen in app' },
{ '<leader>nO', ':ObsidianOpen<cr>', desc = 'obsidian [O]pen in app' },
},
config = function()
---@diagnostic disable-next-line: missing-fields
require('obsidian').setup {
ui = {
enable = false,
},
workspaces = {
{
name = 'notes',
path = '~/notes',
},
},
-- Optional, for templates (see below).
templates = {
folder = "templates",
date_format = "%Y-%m-%d",
time_format = "%H:%M",
-- A map for custom variables, the key should be the variable and the value a function
substitutions = {},
},
daily_notes = {
-- Optional, if you keep daily notes in a separate directory.
-- folder = "dailies",
-- 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 = 'template-daily.md'
},
mappings = {
-- Overrides the 'gf' mapping to work on markdown/wiki links within your vault.
['gf'] = {
Expand Down Expand Up @@ -93,8 +116,6 @@ return {
return tostring(os.time()) .. '-' .. suffix
end,
}

vim.wo.conceallevel = 1
end,
},
}

0 comments on commit 8c4ecd9

Please sign in to comment.