obsidian-api
obsidian-api copied to clipboard
Expose API to get Config
I'd like app.vault.getConfig() exposed, so I can get configuration settings to apply to custom file handlers (for example, my CookLang plugin).
Even better if we can get some sort of event to listen for when specific config values change, so plugin views can respond to config changes like line numbers, word wrap, readable line length, etc.
Some side-notes might be useful, after some try-and-error, I found a way to access the configuration files and folders by this:
app.vault.adapter.list(app.vault.configDir).then(x=>console.log(x))
// then use app.vault.adapter.list recursively
But I don't know whether it's possible to listen to file changes.
I would like this as well so i could read attachmentFolderPath
I would love to have this to make my custom dictionary sync plugin (WIP) more user-friendly.
Some side-notes might be useful, after some try-and-error, I found a way to access the configuration files and folders by this:
app.vault.adapter.list(app.vault.configDir).then(x=>console.log(x)) // then use app.vault.adapter.list recursivelyBut I don't know whether it's possible to listen to file changes.
I think this is an access to the config of a specific vault. I don't know what the OP had in mind, but I would like to access the config of Obsidian as an app, because the custom dictionary is stored there. (for Linux and Windows. For Mac, it is outside of the app)
What is going on with this issue please ?