Skip to content

ignore workspace if it doesn't exist. #443

Answered by epwalsh
azinsharaf asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @azinsharaf, I would recommend dynamically setting your workspace config. For example:

local Path = require("plenary.path")

local workspaces = {}

if Path:new("/path/to/onedrive/workspace"):exists() then
  table.insert(workspaces, { path = "...", ... })
end

require("obsidian").setup({ workspaces = workspaces, ... })

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@epwalsh
Comment options

@azinsharaf
Comment options

@epwalsh
Comment options

@azinsharaf
Comment options

@xarthurx
Comment options

Answer selected by azinsharaf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants