You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return {
"epwalsh/obsidian.nvim",
version="*", -- recommended, use latest release instead of latest commitlazy=true,
ft="markdown",
mappings= {
-- Overrides the 'gf' mapping to work on markdown/wiki links within your vault.
["gf"] = {
action=function()
returnrequire("obsidian").util.gf_passthrough()
end,
opts= { noremap=false, expr=true, buffer=true },
},
-- Toggle check-boxes.
["<leader>ch"] = {
action=function()
returnrequire("obsidian").util.toggle_checkbox()
end,
opts= { buffer=true },
},
-- Smart action depending on context, either follow link or toggle checkbox.
["<cr>"] = {
action=function()
returnrequire("obsidian").util.smart_action()
end,
opts= { buffer=true, expr=true },
}
},
dependencies= {
-- Required."nvim-lua/plenary.nvim",
-- see below for full list of optional dependencies 👇
},
opts=function()
localusername=vim.fn.system("whoami"):gsub("\n", "")
localworkspaceifusername:match("user1") thenworkspace= {
name="personal",
path="/path/to/new/vault1",
}
elseworkspace= {
name="work",
path="path/to/new/vault2",
}
endreturn {
workspaces= {workspace},
}
end,
}
the error I get is:
E5113: Error while calling lua chunk: ...al/share/nvim/lazy/obsidian.nvim/lua/obsidian/client.lua:95: At least one workspace is required!
Please specify a workspace in your Obsidian.nvim config.
the reason i am trying to do this is because with these opts:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
ideally I would like this block of code to work:
the error I get is:
the reason i am trying to do this is because with these opts:
I get an error saying that it can't resolve
path/to/personal
which makes sense because that path only exists on my personal machine.anyone have an idea?
Beta Was this translation helpful? Give feedback.
All reactions