Spellcheck Startup Fix
unlistedby pandadraws
Fix spellcheck silently not working after a restart on Linux, caused by an Electron bug in Obsidian 1.13.4 and later.
Spellcheck Startup Fix
An Obsidian plugin that fixes spellcheck silently not working on Linux after you restart Obsidian.
The problem
On Linux, Obsidian installers from 1.13.4 onward bundle a version of Electron (40 through 43.4) with a spellcheck bug. Spellcheck works the first time Obsidian runs, but on every later start misspelled words get no red underline, and nothing under Settings → Editor brings it back: toggling spellcheck or changing languages has no effect.
The bug is upstream in Chromium and Electron (electron/electron#50327). When the dictionary is already cached on disk from a previous run, it loads so quickly that Chromium hands it to the editor before the editor's process has finished starting. The editor marks spellcheck as unavailable, and the call that is supposed to repair this skips processes that are still starting. Electron fixed it in 43.5.0 and 44.0.0, but Obsidian hasn't shipped an installer with a fixed Electron yet. Discussion: Obsidian forum thread.
What the plugin does
When your vault finishes loading, the plugin asks the spellchecker about a made-up word. If spellcheck is working, it does nothing. If it isn't, the plugin turns Electron's spellchecker off and on again, which makes Electron send the dictionary to the editor again. Misspellings are underlined right away, including in notes that are already open.
- Linux desktop only. On Windows, macOS and mobile it does nothing.
- No settings, no network access, no data collected.
- It doesn't change your preferences: if spellcheck is off under Settings → Editor, it stays off.
Unlike the workaround on the forum (deleting the cached dictionary before every launch), this works offline, doesn't re-download the dictionary on every start, and doesn't depend on winning a race.
Installing
From Obsidian: Settings → Community plugins → Browse, search for "Spellcheck Startup Fix", then install and enable it.
Manually: download main.js and manifest.json from the latest release into <your vault>/.obsidian/plugins/spellcheck-startup-fix/, then enable the plugin under Settings → Community plugins.
When you can remove it
Once your Obsidian installer bundles Electron 43.5.0, 44.0.0 or later, spellcheck works at startup by itself and this plugin quietly does nothing. To check, open the developer console (Ctrl+Shift+I) and run process.versions.electron. Obsidian's in-app updates don't change the Electron version; only a new installer (or a Flatpak, AppImage or distro package update) does.
License
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.