Obsidian integration - Not better than org mode but why re-invent my system
This commit is contained in:
parent
ef05e41471
commit
6be120ede6
4 changed files with 56 additions and 3 deletions
|
|
@ -10,3 +10,4 @@ require("core.plugin_config.whichkey")
|
||||||
require("core.plugin_config.indent-blankline")
|
require("core.plugin_config.indent-blankline")
|
||||||
require("core.plugin_config.org")
|
require("core.plugin_config.org")
|
||||||
require("core.plugin_config.darklight")
|
require("core.plugin_config.darklight")
|
||||||
|
require("core.plugin_config.obsidian")
|
||||||
|
|
|
||||||
23
lua/core/plugin_config/obsidian.lua
Normal file
23
lua/core/plugin_config/obsidian.lua
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
require("obsidian").setup({
|
||||||
|
workspaces = {
|
||||||
|
{
|
||||||
|
name = "vault",
|
||||||
|
path = "~/Sync/wiki",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
completion = {
|
||||||
|
-- Set to false to disable completion.
|
||||||
|
nvim_cmp = true,
|
||||||
|
},
|
||||||
|
daily_notes = {
|
||||||
|
-- Optional, if you keep daily notes in a separate directory.
|
||||||
|
folder = "diary",
|
||||||
|
-- Optional, if you want to automatically insert a template from your template directory like 'daily.md'
|
||||||
|
template = "Templates/daily_note"
|
||||||
|
},
|
||||||
|
templates = {
|
||||||
|
subdir = "Templates",
|
||||||
|
-- A map for custom variables, the key should be the variable and the value a function
|
||||||
|
substitutions = {},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
@ -37,8 +37,8 @@ local keymap = {
|
||||||
name = '+todo',
|
name = '+todo',
|
||||||
j = { '<Cmd>TodoLocList<CR>', 'List TODO:\'s in buffer' },
|
j = { '<Cmd>TodoLocList<CR>', 'List TODO:\'s in buffer' },
|
||||||
T = { '<Cmd>TodoTelescope<CR>', 'Search TODO:\'s' },
|
T = { '<Cmd>TodoTelescope<CR>', 'Search TODO:\'s' },
|
||||||
n = {function() require("todo-comments").jump_next() end, 'Jump to next TODO:' },
|
n = { function() require("todo-comments").jump_next() end, 'Jump to next TODO:' },
|
||||||
N = {function() require("todo-comments").jump_prev() end, 'Jump to previous TODO:' },
|
N = { function() require("todo-comments").jump_prev() end, 'Jump to previous TODO:' },
|
||||||
},
|
},
|
||||||
w = {
|
w = {
|
||||||
name = '+window',
|
name = '+window',
|
||||||
|
|
@ -64,6 +64,25 @@ local keymap = {
|
||||||
},
|
},
|
||||||
m = {
|
m = {
|
||||||
'<Cmd>DarkLightSwitch<CR>', 'Toggle dark mode'
|
'<Cmd>DarkLightSwitch<CR>', 'Toggle dark mode'
|
||||||
|
},
|
||||||
|
v = {
|
||||||
|
name = '+obsidian Vault',
|
||||||
|
i = {'<Cmd>e ~/Sync/wiki/index.md<CR>', 'Open Index'},
|
||||||
|
o = {'<Cmd>ObsidianOpen<CR>', 'Obsidian Open'},
|
||||||
|
n = {'<Cmd>ObsidianNew<CR>', 'New Note'},
|
||||||
|
q = {'<Cmd>ObsidianQuickSwitch<CR>', 'Quick Switch with fzf'},
|
||||||
|
f = {'<Cmd>ObsidianFollowLink<CR>', 'Follow Link'},
|
||||||
|
b = {'<Cmd>ObsidianBacklinks<CR>', 'List Backlinks'},
|
||||||
|
d = {'<Cmd>ObsidianToday<CR>', 'Open Daily Note'},
|
||||||
|
y = {'<Cmd>ObsidianYesterday<CR>', 'Open Yesterdays Note'},
|
||||||
|
t = {'<Cmd>ObsidianTomorrow<CR>', 'Open Tomorrows Note'},
|
||||||
|
T = {'<Cmd>ObsidianTemplate<CR>', 'Open Template'},
|
||||||
|
s = {'<Cmd>ObsidianSearch<CR>', 'Search Notes'},
|
||||||
|
l = {'<Cmd>ObsidianLink<CR>', 'Link Current Selection'},
|
||||||
|
L = {'<Cmd>ObsidianLinkNew<CR>', 'Link New Note from Current Selection'},
|
||||||
|
w = {'<Cmd>ObsidianWorkspace<CR>', 'Switch Workspace'},
|
||||||
|
p = {'<Cmd>ObsidianPasteImg<CR>', 'Paste Image'},
|
||||||
|
r = {'<Cmd>ObsidianRename<CR>', 'Rename Note'},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
-- Map window keys to leader w
|
-- Map window keys to leader w
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ local plugins = {
|
||||||
-- fzf
|
-- fzf
|
||||||
{
|
{
|
||||||
'nvim-telescope/telescope.nvim',
|
'nvim-telescope/telescope.nvim',
|
||||||
branch = "0.1.x",
|
--branch = "0.1.x",
|
||||||
dependencies = { { 'nvim-lua/plenary.nvim' } }
|
dependencies = { { 'nvim-lua/plenary.nvim' } }
|
||||||
},
|
},
|
||||||
-- TODO
|
-- TODO
|
||||||
|
|
@ -78,6 +78,16 @@ local plugins = {
|
||||||
"ranjithshegde/orgWiki.nvim",
|
"ranjithshegde/orgWiki.nvim",
|
||||||
dependencies = { { 'nvim-orgmode/orgmode' } },
|
dependencies = { { 'nvim-orgmode/orgmode' } },
|
||||||
},
|
},
|
||||||
|
-- Obsidian
|
||||||
|
{
|
||||||
|
"epwalsh/obsidian.nvim",
|
||||||
|
version = "*",
|
||||||
|
lazy = true,
|
||||||
|
ft = "markdown",
|
||||||
|
dependencies = {
|
||||||
|
"nvim-lua/plenary.nvim",
|
||||||
|
},
|
||||||
|
},
|
||||||
-- Lightmode switcher
|
-- Lightmode switcher
|
||||||
'eliseshaffer/darklight.nvim'
|
'eliseshaffer/darklight.nvim'
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue