Cleaned up and added options to passage ref query.

This commit is contained in:
Caleb Campbell
2025-07-11 15:26:26 +10:00
parent 342eedaa43
commit eb6869738c
10 changed files with 2423 additions and 562 deletions

14
main.ts
View File

@@ -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() {