Skip to content

Add WordLex (offline dictionary) extension#279

Open
vedesh-padal wants to merge 2 commits into
vicinaehq:mainfrom
vedesh-padal:add-wordlex-extension
Open

Add WordLex (offline dictionary) extension#279
vedesh-padal wants to merge 2 commits into
vicinaehq:mainfrom
vedesh-padal:add-wordlex-extension

Conversation

@vedesh-padal

@vedesh-padal vedesh-padal commented May 24, 2026

Copy link
Copy Markdown

This Pull Request introduces the WordLex offline dictionary extension to the Vicinae ecosystem.

WordLex is a blisteringly fast, offline-first English dictionary and thesaurus powered by the comprehensive Open English WordNet (OEWN) 2025 database (~150,000+ words, 120,000+ synsets).
WordLex Desktop App

This extension brings instant dictionary lookups, synonyms, antonyms, and lexical relations directly to your keyboard launcher without any external API calls or internet dependencies.


🌟 Features Included

  • Prefix Search (search-dictionary): Lightning-fast type-ahead search through 150k+ words. It loads the top 5 results' full detail inline, while seamlessly falling back to a compact search definition for lower results to completely bypass UI blocking.
  • Define Clipboard Word (define-clipboard): Instantly look up the word in your clipboard or active text selection and display its detailed entry in a full-screen Detail view.
  • Random Word (random-word): Fetch a random interesting word from the database—perfect for vocabulary building.
  • Full Markdown Detail Support: Renders pronunciation, part-of-speech groupings, definitions, real-world examples, and semantic relations (Hypernyms, Hyponyms, Meronyms, Holonyms) inside Vicinae's native markdown widget.
  • Command Actions:
    • Enter: Navigate to a dedicated full-screen markdown view.
    • Cmd+C: Copy the clean formatted definition.
    • Cmd+Shift+P: Paste the looked-up word directly into your frontmost active window.
    • Cmd+W: Cross-reference the word instantly on Wiktionary.
    • Cmd+O: Launch/Focus the native WordLex GUI desktop app with the searched word pre-focused.

🔌 Prerequisites & Integration Details

To maintain a zero-duplication database model, the extension connects to the locally installed WordLex desktop app's background service.
Download it from the GitHub Releases page

  • Requires the desktop app to be installed (version v2.0.0+).
  • The extension automatically spawns wordlex --service as a lightweight, detached background daemon (~37MB RAM).
  • Communicates via local REST endpoints, delivering blazing-fast performance without spawning blocking subprocesses on every keystroke.

📸 Screenshots & Showcase

1. Dictionary Search & Autocomplete

Dictionary Search & Autocomplete

2. Full Definition View

image

3. Commands Available

image

4. Random Word Explorer

image

🧪 How to Test Locally

  1. Ensure you have WordLex v2.0.0+ installed:
    wordlex --version
    # Output should show v2.0.0 or higher
  2. Install extension dependencies:
    npm install
  3. Run the development loop:
    npm run dev
  4. Test the following paths:
    • Type a word (e.g. ephemeral) in the launcher to verify prefix matching.
    • Use arrow keys to navigate results to ensure smooth cache-populated detail changes.
    • Press Enter to drill into the full view, then try pressing Cmd+W to verify browser redirection.
    • Copy a word to your clipboard and trigger the Define Clipboard Word command.
    • Trigger the Random Word command.

🏁 Submission Checklist

  • Tested locally on Linux/Vicinae
  • Ran npm run lint and resolved all warnings (0 errors)
  • Ran npm run typecheck to confirm complete TypeScript coverage
  • Checked package.json manifest matches naming, author format, and category standards
  • High-res extension_icon.png included under /assets

- Add dynamically detected cmdModifier constant ('cmd' on macOS/Raycast, 'ctrl' on Linux/Vicinae/GNOME) to prevent Super key hijack
- Apply cmdModifier to all keyboard shortcut modifiers throughout search-dictionary, define-clipboard, and random-word commands
- Re-formatted and validated types
@vedesh-padal vedesh-padal marked this pull request as ready for review May 24, 2026 19:13
@vedesh-padal vedesh-padal changed the title Add wordlex extension Add WordLex (offline dictionary) extension May 24, 2026
@vedesh-padal

vedesh-padal commented May 24, 2026

Copy link
Copy Markdown
Author

Hey @aurelleb,

I've been using Vicinae on Linux for a while now (switched from Windows about a year ago, missed having Raycast, and Vicinae has been a lifesaver). I wanted to experiment with building my first extension for it, so I put this together.

It's an offline dictionary extension that queries my app, WordLex (which uses the offline OEWN 2025 SQLite database). I've tested it locally to make sure the building (vici build), typechecking, and linting all pass completely clean.

Since it's my first PR here. Whenever you get a chance, take a look and approve...

Really appreciate all the work you've put into Vicinae!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant