-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathobsidian.lua
More file actions
32 lines (30 loc) · 951 Bytes
/
obsidian.lua
File metadata and controls
32 lines (30 loc) · 951 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
return {
"obsidian-nvim/obsidian.nvim",
version = "*",
cmd = { "Obsidian" },
ft = { "markdown" },
dependencies = {
"nvim-telescope/telescope.nvim",
"hrsh7th/nvim-cmp",
},
opts = {
legacy_commands = false,
workspaces = {
{
name = "notes",
path = "~/Documents/notes",
},
},
},
config = function(_, opts)
require("obsidian").setup(opts)
local map = function(lhs, rhs, desc)
vim.keymap.set("n", lhs, rhs, { silent = true, noremap = true, desc = desc })
end
map("<leader>oo", "<Cmd>Obsidian quick_switch<CR>", "[O]bsidian [O]pen note picker")
map("<leader>on", "<Cmd>Obsidian new<CR>", "[O]bsidian [N]ew note")
map("<leader>os", "<Cmd>Obsidian search<CR>", "[O]bsidian [S]earch vault notes")
map("<leader>ot", "<Cmd>Obsidian today<CR>", "[O]bsidian [T]oday's note")
map("<leader>ob", "<Cmd>Obsidian backlinks<CR>", "[O]bsidian [B]acklinks")
end,
}