forked from camelChief/local-bible-ref
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.ts
More file actions
30 lines (25 loc) · 832 Bytes
/
main.ts
File metadata and controls
30 lines (25 loc) · 832 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import { Plugin } from 'obsidian';
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;
async onload() {
await this.loadSettings();
this.addSettingTab(new LocalBibleRefSettingTab(this.app, this));
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() {
await this.saveData(this.settings);
}
}