Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi vault support #190

Closed
mertnuhoglu opened this issue Sep 9, 2023 · 7 comments
Closed

Multi vault support #190

mertnuhoglu opened this issue Sep 9, 2023 · 7 comments

Comments

@mertnuhoglu
Copy link

🚀 The feature, motivation and pitch

I have multiple Obsidian vaults (directories). Is it possible to add support for multiple vaults?

Alternatives

No response

Additional context

No response

@epwalsh
Copy link
Owner

epwalsh commented Sep 11, 2023

Hey @mertnuhoglu we have a PR right now that would support this: #155

@oflisback
Copy link
Contributor

Very nice to see that more people are interested in this. Please critique this alternative approach:

Each buffer knows what vault it belongs to automatically by checking the path hierarchy for .obsidian folders, these lookups can also be cached. Basically something like what I did here but returning the vault path: is_obsidian_vault.

Two benefits:

  • No need to explicitly set a vault dir or workspaces in the configuration.
  • Each buffer knows its context so commands can be applied in the right context automatically.

@epwalsh
Copy link
Owner

epwalsh commented Oct 17, 2023

@oflisback, I like the simplicity of that. But I also like how #155 gives users more control. That said, I think this functionality could be built on top of #155 easily. Once that merges we can explore this more.

@adam-devel
Copy link

adam-devel commented Dec 3, 2023

@epwalsh
#257 is relevant to this. workspaces are functionally the same as vaults, so i think this is the right place to discuss this

  • should templates be read at some chosen "main vault" root directory (the way it's done right now)
  • or should it be read relative to the current workspace ?
  • or should it be a per-workspace option: {name="foo", path="bar", template_configs..} ?

introducing configuration options for all of these behaviors would be too much work in one pull request, we should choose a reasonable default and maybe later add options for the other scenarios.

@adam-devel
Copy link

I like the simplicity of that. But I also like how #155 gives users more control

how about extending the current detect_cwd functionality to do what @oflisback described, that way users have control through :ObsidianWorkflow and they can additionally turn on detect_cwd and have the plugin change directory to the parent of the nearest .obsdian directory

@epwalsh
Copy link
Owner

epwalsh commented Dec 4, 2023

I'll follow up on the templates question in the PR.

@epwalsh
Copy link
Owner

epwalsh commented Dec 20, 2023

Closing as this is now fully supported through the config.workspaces option. As of #277 you can also override certain settings for each workspace.

@epwalsh epwalsh closed this as completed Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants