···
1
-
require("obsidian").setup({
2
+
local function find_vault_path()
3
+
local cwd = vim.loop.cwd()
6
+
if vim.fs.basename(path) == "vault" then
9
+
path = vim.fs.dirname(path)
14
+
local vault_path = find_vault_path()
16
+
if vault_path ~= nil then
17
+
require("obsidian").setup({
13
-
-- Overrides the 'gf' mapping to work on markdown/wiki links within your vault.
16
-
return require("obsidian").util.gf_passthrough()
18
-
opts = { noremap = false, expr = true, buffer = true },
29
+
-- Overrides the 'gf' mapping to work on markdown/wiki links within your vault.
32
+
return require("obsidian").util.gf_passthrough()
34
+
opts = { noremap = false, expr = true, buffer = true },
36
+
-- Toggle check-boxes.
39
+
return require("obsidian").util.toggle_checkbox()
41
+
opts = { buffer = true },
43
+
-- Smart action depending on context, either follow link or toggle checkbox.
46
+
return require("obsidian").util.smart_action()
48
+
opts = { buffer = true, expr = true },
20
-
-- Toggle check-boxes.
23
-
return require("obsidian").util.toggle_checkbox()
25
-
opts = { buffer = true },
27
-
-- Smart action depending on context, either follow link or toggle checkbox.
30
-
return require("obsidian").util.smart_action()
32
-
opts = { buffer = true, expr = true },
38
-
disable_frontmatter = true,
39
-
wiki_link_func = "use_path_only",
54
+
disable_frontmatter = true,
55
+
wiki_link_func = "use_path_only",