Skip to content

Commit

Permalink
Merge pull request #586 from Automattic/obsidian-fix
Browse files Browse the repository at this point in the history
docs(obsidian): notify people they should use up-to-date Electron
  • Loading branch information
elijah-potter authored Feb 4, 2025
2 parents b40715d + a059c9c commit 8b4a81b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
7 changes: 6 additions & 1 deletion packages/obsidian-plugin/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import logoSvg from '../logo.svg';
import { Plugin, Menu, PluginManifest, App } from 'obsidian';
import { Plugin, Menu, PluginManifest, App, Notice } from 'obsidian';
import { LintConfig, Linter, Suggestion } from 'harper.js';
import { LocalLinter, SuggestionKind, WorkerLinter } from 'harper.js';
import { linter } from './lint';
Expand Down Expand Up @@ -81,6 +81,11 @@ export default class HarperPlugin extends Plugin {
}

async onload() {
if (typeof Response == 'undefined') {
new Notice('Please update your Electron version before running Harper.', 0);
return;
}

const data = await this.loadData();
await this.initializeFromSettings(data);
this.registerEditorExtension(this.editorExtensions);
Expand Down
14 changes: 10 additions & 4 deletions packages/web/src/routes/docs/integrations/obsidian/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,16 @@ The Harper plugin is a powerful, privacy-first grammar and spell-checking tool d

## Installation Guide

1. Open Obsidian and navigate to **Settings → Community Plugins → Browse**.
2. Search for "Harper" in the plugin library.
3. Click "Install" and then "Enable."
4. Start typing in your notes—Harper will automatically highlight errors as you go!
- Open Obsidian and navigate to **Settings → Community Plugins → Browse**.
- Search for "Harper" in the plugin library.
- Click "Install" and then "Enable."
- Start typing in your notes—Harper will automatically highlight errors as you go!

---

:::warning[Notice]
Harper expects an up-to-date version of Electron. If you have issues, [reinstall Obsidian](https://obsidian.md/download) or otherwise update your Electron version.
:::

## Future Development

Expand Down

0 comments on commit 8b4a81b

Please sign in to comment.