Skip to content

Dictionary Window #29

Description

@dG9hc3Q

Summary

A Dictionary / Thesaurus tool window — look up the definition, part of
speech, and synonyms/antonyms for the word under the cursor (or a typed
query) without leaving the editor. Sits in the tool-window system alongside
Rhyme Search.

Motivation

Poets reach for meaning and near-synonyms constantly. Today the only
word-tool is Rhyme Search (src/rhyme/search.rs, Datamuse-backed). A
dictionary/thesaurus is the obvious companion panel.

Scope (v1)

  • Bottom or right tool window, toggled from the tool-window stripe.
  • Input: current selection / word at caret, plus a search box.
  • Output: headword, pronunciation (reuse CMUdict / the pronunciation
    resolver), definitions grouped by part of speech, synonyms, antonyms.
  • Double-click a synonym to insert it; copy-from any entry.

Offline-first (non-negotiable #4)

  • Local first: bundle a permissively-licensed English dictionary +
    thesaurus dataset (e.g. WordNet 3.0, or wiktionary-derived) under
    assets/, compiled via build.rs, queried with zero network.
  • Datamuse (ml=, syn, ant, md=d) is enhancement only — short
    timeout, falls back to the bundled data, has an off switch. English only.

Files (sketch)

  • new src/tools/dictionary.rs (or src/rhyme/ sibling) — panel + lookup.
  • assets/dictionary/… + build.rs entry for the bundled dataset.
  • tool-window registration in app/chrome.rs + app/layout.rs.
  • a show_dictionary_panel / enable-online-lookup setting via the existing
    settings pattern.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions