Merge branch 'master' into laptop

This commit is contained in:
Thomas Avé 2024-02-10 14:03:38 +01:00
commit 6bebcfa8f1
1 changed files with 29 additions and 8 deletions

View File

@ -15,22 +15,43 @@ end
return {
"epwalsh/obsidian.nvim",
version = "*", -- recommended, use latest release instead of latest commit
ft = "markdown",
lazy = false,
dependencies = { "nvim-lua/plenary.nvim" },
opts = {
workspaces = {
{
name = "Lumentis",
path = "~/Workspace/DnD/Lumentis/",
path = "~/Workspace/DnD/Lumentis",
},
{
name = "Notes",
path = "~/Workspace/Notes/",
path = "~/Workspace/Notes",
},
{
name = "PhD Notes",
path = "~/Workspace/University/PhD/Notes/",
name = "PhD-Notes",
path = "~/Workspace/University/PhD/Notes",
},
{
name = "DnD",
path = "~/Workspace/DnD",
},
{
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'
completion = {
new_notes_location = "current_dir",
},
},
},
},
daily_notes = {
folder = "Daily",
},
disable_frontmatter = true,
ui = {
@ -41,13 +62,13 @@ return {
},
keys = {
{"<cr>", handle_enter, ft = "markdown" },
{"<cr>", ":ObsidianLink<cr>", ft = "markdown", mode = "v"},
{"<leader>rn", ":ObsidianRename<cr>", ft = "markdown" },
{"<cr>", "<cmd>ObsidianLink<cr>", ft = "markdown", mode = "v"},
{"<leader>rn", "<cmd>ObsidianRename<cr>", ft = "markdown" },
{"<leader>l", "i- [ ] ", ft = "markdown"},
{"<leader>l", "- [ ] ", ft = "markdown", mode = "i" },
{"<leader>j", "<cmd>ObsidianToday<cr>"},
{"<tab>", ":set nohlsearch<cr>/\\[[^\\[\\]]*\\]([^()]*)<cr>:let @/ = \"\"<cr>:set hlsearch<cr>", ft = "markdown", silent = true },
},
detect_cwd = true,
config = function (_, opts)
require("obsidian").setup(opts)
end