How do I access other plugins' settings?

I want to extend the functionality of the Daily Notes core plugin, but in order to do what I want, I need to know the values of the “Date format” and “New file location” settings. How do I access settings values from other plugins?

The only thing I’ve found that’s even close is a question about accessing global settings but there’s only one reply and the link in it is broken. Help?

You can get Daily Notes plugin instance using this:

Disclaimer: This is not in public API, so it might be changed anytime.

// Assume "this" is your Plugin instance

// Will return null if it's disabled
this.app.internalPlugins.getEnabledPluginById("daily-notes");

// Always return Daily Notes plugin instance
let dailyNotesPlugin = this.app.internalPlugins.getPluginById("daily-notes");

// Access its configuration
let dailyNotesPluginOptions = dailyNotesPlugin.options;

// Will return default date format if "Date format" field was empty
let dateFormat = dailyNotesPlugin.getFormat();
1 Like