All plugins

spellcheck-plus

Replacement suggestions for misspelled words in the Hermes Desktop composer: right-click a word and the custom context menu lists up to four candidates plus "Add to dictionary". Ten bundled frequency dictionaries (ru 200k word forms, en 46 691, uk 44 303, de 49 305, fr 46 687, es 49 520, it 45 114, pt 43 952, pl 49 635, tr 48 515), each language toggled in Settings ▸ Plugins and only decompressed when enabled; the entry is named in the UI language ("Проверка орфографии" in Russian). Desktop-only, built on the plugin SDK: it registers a composer.contextMenu provider and a settings page, never touches the app's DOM and patches no core file. Disclosure — runs only in the Desktop renderer, computes suggestions locally from bundled word lists and makes no network calls; "Add to dictionary" writes the word into the app's Chromium spell-check dictionary. The repository also ships an optional Windows script (patches/apply-fix.cjs) that, if you run it yourself, edits the installed Hermes Desktop app's bundled JavaScript to turn on spell-check underlines and copies bundled Chromium dictionary files into the app's data folder; the plugin never runs it, and an app update undoes it.

samieshmil-blipDesktopv0.2.1Updated 5 days ago

About

Replacement suggestions for misspelled words in the Hermes Desktop composer: right-click a word and the custom context menu lists up to four candidates plus "Add to dictionary". Ten bundled frequency dictionaries (ru 200k word forms, en 46 691, uk 44 303, de 49 305, fr 46 687, es 49 520, it 45 114, pt 43 952, pl 49 635, tr 48 515), each language toggled in Settings ▸ Plugins and only decompressed when enabled; the entry is named in the UI language ("Проверка орфографии" in Russian). Desktop-only, built on the plugin SDK: it registers a composer.contextMenu provider and a settings page, never touches the app's DOM and patches no core file. Disclosure — runs only in the Desktop renderer, computes suggestions locally from bundled word lists and makes no network calls; "Add to dictionary" writes the word into the app's Chromium spell-check dictionary. The repository also ships an optional Windows script (patches/apply-fix.cjs) that, if you run it yourself, edits the installed Hermes Desktop app's bundled JavaScript to turn on spell-check underlines and copies bundled Chromium dictionary files into the app's data folder; the plugin never runs it, and an app update undoes it.

Spellcheck Plus для Hermes Desktop

Русские, английские (и ещё восемь) варианты замены для слов с опечатками в поле ввода Hermes: правый клик по слову → «Возможно, вы имели в виду: …» → один клик заменяет слово. Языки включаются и выключаются в Настройки ▸ Плагины, выключенные даже не распаковываются.

English version below

Меню правого клика, русский

АнглийскийНемецкий интерфейс приложения
ende

Настройки плагина

Зачем

Hermes рисует меню правого клика сам (свой React-меню вместо системного). Из-за этого до меню не доезжают данные проверки орфографии, которые Chromium отдаёт в событии context-menu: подчёркивание видно, а списка вариантов нет.

Плагин закрывает ровно эту дыру штатным путём — через слот COMPOSER_AREAS.contextMenu из plugin SDK. Никакого доступа к DOM приложения, никаких патчей ядра: приложение само говорит плагину «под курсором такое-то слово», а плагин возвращает строки меню.

Что внутри

  • Словари — частотные списки из FrequencyWords (MIT, 2018): русский 200 000 словоформ, украинский 44 303, английский 46 691, немецкий 49 305, французский 46 687, испанский 49 520, итальянский 45 114, португальский 43 952, польский 49 635, турецкий 48 515.
  • Словари упакованы в plugin.js через gzip + base64: файл ~3.6 МБ на десять языков, распаковка ~60 мс на язык при старте, индекс ~150 мс — в фоне, меню не ждёт.
  • Поиск вариантов: расстояние Дамерау ≤ 1 для всех слов; ≤ 2 — только если первой правки не хватило, с жёстким бюджетом 45 мс / 30 000 кандидатов. Худший замер — 17 мс.
  • Защита от ложных срабатываний: вторая правка не применяется, если слово похоже на словоформу известного (орфографи-я → есть орфографии).
  • «Добавить в словарь» кладёт слово в словарь Chromium — подчёркивание снимается сразу.

Установка

git clone https://github.com/samieshmil-blip/hermes-spellcheck-plus
mkdir -p ~/.hermes/desktop-plugins/spellcheck-plus   # Windows: %LOCALAPPDATA%\hermes\desktop-plugins\spellcheck-plus
cp -r hermes-spellcheck-plus/desktop/plugin.js ~/.hermes/desktop-plugins/spellcheck-plus/

Файл подхватывается за пару секунд, перезапуск приложения не нужен (hot reload). Проверить: правый клик в поле ввода по слову с опечаткой.

Красное подчёркивание — это нативная проверка Chromium; в текущих сборках Hermes поле ввода создаётся с spellcheck="false", поэтому для подчёркивания нужен патч приложения (см. ниже). Подсказки плагина работают и без него.

Красные подчёркивания (необязательно)

Пока upstream не отдал плагинам опцию включать проверку для composer'а (PR #143057), вкл. двумя правками в уже собранном приложении — patches/ru-spellcheck из этого репозитория:

node patches/apply-fix.cjs      # идемпотентно, кладёт .bak рядом, копирует словари Hunspell

Скрипт правит dist/electron-main.mjs (языки словаря ru + en-US) и dist/assets/main-*.js (spellCheck: true для поля ввода), после чего Chromium подчёркивает опечатки. Обновление приложения перезаписывает файлы — скрипт запускается повторно (или кладётся в автозагрузку).

Языки в настройках

Настройки ▸ Плагины ▸ Проверка орфографии (название берётся из языка интерфейса: в английском UI это Spellcheck Plus, в немецком Rechtschreibprüfung и т. д.) — список языков с переключателями: Русский, English, Українська, Deutsch, Français, Español, Italiano, Português, Polski, Türkçe. По умолчанию включены русский и английский; выбор хранится в профиле плагина (ctx.storage), применяется сразу, выключенный язык не распаковывается в память.

Где найти настройки

Добавить новый язык = добавить частотный список в tools/build-dictionaries.mjs (одна строка в LANGS: подпись, алфавит, набор письма, файл, лимит) и пересобрать plugin.js.

Интерфейс переведён на все локали приложения: en, ru, zh, zh-hant, ja, ar, fr, de, es.

Ограничения

  • Проверяются только языки из словаря плагина (русский, английский). Добавить язык = добавить частотный список и алфавит в desktop/plugin.js (см. tools/build-dictionaries.mjs).
  • Подсказки эвристические: вариант может быть не первым в списке, а иногда его не будет вовсе — подчёркивание при этом остаётся.
  • Плагин не делает морфологический разбор: словоформы, которых нет в частотном списке, могут не найтись.

Разработка

node tools/build-dictionaries.mjs   # пересобрать plugin.js из списков в data/
node --check desktop/plugin.js      # синтаксис
hermes plugins validate .           # проверки каталога
hermes plugins doctor .

Исходник шаблона — tools/plugin.template.js, данные качает tools/build-dictionaries.mjs (FrequencyWords, MIT).

Лицензия

MIT, см. LICENSE. Словари — FrequencyWords (MIT).


English

Russian and English replacement suggestions for misspelled words in the Hermes Desktop composer: right-click a word → “Did you mean: …” → one click replaces it. Languages are toggled in Settings ▸ Plugins.

Right-click menu, English

Why. Hermes renders its own context menu and never gives the app Chromium's spell-check payload (context-menu params). The red underline shows up, the suggestion list does not. This plugin fills that gap through the supported plugin SDK slot COMPOSER_AREAS.contextMenu — no DOM reach-in, no core patches.

How. Frequency word lists from FrequencyWords (MIT): ru 200k forms, plus en, uk, de, fr, es, it, pt, pl, tr (~45–50k each), gzip+base64 inside plugin.js. Damerau distance ≤ 1 candidates everywhere, distance ≤ 2 only as a fallback, capped at 45 ms / 30,000 candidates (worst measured: 17 ms). Languages are toggled in Settings ▸ Plugins; a disabled language is never decompressed.

Install. Copy desktop/plugin.js into ~/.hermes/desktop-plugins/spellcheck-plus/ (%LOCALAPPDATA%\hermes\desktop-plugins\spellcheck-plus on Windows). Hot-reloads in seconds.

Settings. Settings ▸ Plugins ▸ Spellcheck Plus (the entry is named in the UI language: «Проверка орфографии» in Russian, Rechtschreibprüfung in German, …), with one switch per bundled language. See docs/screenshots/where-to-find.png.

Underlines come from Chromium and need the app-side spellcheck flag; patches/apply-fix.cjs sets it (idempotent, reverts on app updates — rerun).

MIT licensed.

README from the reviewed commit 3584e6b; it updates when the author re-pins.

More by samieshmil-blip

2 plugins by samieshmil-blip in the catalog.

Developer Mode

Explore built-in Hermes toolsets and actions.

HermesAgent

Developer?

Create a Hermes extension for Desktop or agent workflows.

Developer Section