Cleaned up and added options to passage ref query.
This commit is contained in:
14
main.ts
14
main.ts
@@ -1,7 +1,8 @@
|
||||
import { Plugin } from 'obsidian';
|
||||
import LocalBibleRefSettingTab from 'src/LocalBibleRefSettingTab';
|
||||
import { PassageSuggester } from 'src/PassageSuggester';
|
||||
import { LocalBibleRefSettings } from 'src/config/settings';
|
||||
import LocalBibleRefSettingTab from 'src/local-bible-ref-setting-tab';
|
||||
import { PassageFormat } from 'src/passage-reference';
|
||||
import { PassageSuggest } from 'src/passage-suggest';
|
||||
import { LocalBibleRefSettings } from 'src/settings';
|
||||
|
||||
export default class LocalBibleRefPlugin extends Plugin {
|
||||
settings: LocalBibleRefSettings;
|
||||
@@ -9,13 +10,18 @@ export default class LocalBibleRefPlugin extends Plugin {
|
||||
async onload() {
|
||||
await this.loadSettings();
|
||||
this.addSettingTab(new LocalBibleRefSettingTab(this.app, this));
|
||||
this.registerEditorSuggest(new PassageSuggester(this.app, this.settings));
|
||||
this.registerEditorSuggest(new PassageSuggest(this.app, this.settings));
|
||||
}
|
||||
|
||||
onunload() {}
|
||||
|
||||
async loadSettings() {
|
||||
this.settings = await this.loadData();
|
||||
this.settings ??= {
|
||||
biblesPath: '',
|
||||
defaultVersionShorthand: '',
|
||||
defaultPassageFormat: PassageFormat.Callout
|
||||
};
|
||||
}
|
||||
|
||||
async saveSettings() {
|
||||
|
||||
Reference in New Issue
Block a user