epwalsh / epwalsh/obsidian.nvim
Read obsidian configuration from .obsidian directory to configure workspace settings
- Dominant language
- Lua
- Stars
- 6.2k
- Forks
- 250
- PR merge metrics
- No merged PRs in 30d
Description
### 🚀 The feature, motivation and pitch
Obsidian uses the `.obsidian` directory to store configuration values as JSON files.
Many of the configuration options in `obsidian.nvim` are sourceable from these configuration files. Some examples:
- `daily_notes` table can be filled in from `.obsidian/daily-notes.json`. In my setup I see the `folder` and `template` keys at least.
- `new_notes_location` is defined by `newFileLocation` in `.obsidian/app.json` (value of `folder` seems to correspond to `notes_subdir`), as well as `notes_subdir` which corresponds to `newFileFolderPath`.
- `templates` table can be filled in from `.obsidian/templates.json`. E.g. the `folder` key can be set from the `folder` property in the JSON file.
It would be incredible to be able to fill these in with the configuration that Obsidian uses since then one would not need to redefine these settings twice, once for the plugin and another time for Obsidian itself.
In order to not be too intrusive, this could potentially be an option enabled per-workspace, something such as `read_config_from_obsidian = true` for each item in `workspaces`.
### Alternatives
The alternative is to duplicate these configurations on both the obsidian settings side as well as `obsidian.nvim` configurations, which this feature request aims to avoid.
### Additional context
_No response_
Contributor guide
Research direction
Start by tracing how workspace configuration is represented, then compare it with the proposed sources: .obsidian/app.json, .obsidian/daily-notes.json, and .obsidian/templates.json. Done means an opt-in workspace setting reads the relevant values into daily_notes, new_notes_location, notes_subdir, and templates without requiring duplicate configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, neovim
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100