Wordlist Autocomplete

by elouahabi-naoufal
5
4
3
2
1
Score: 50/100

Description

The Wordlist Autocomplete plugin suggests words from enabled JSON wordlists, with domain and category labels on each result. Matching prioritises prefixes, followed by shorthand with vowels removed after the first letter, then matches anywhere within a word. Each keystroke produces up to 10 suggestions. Ranking also considers optional personal learning, word length and a configurable global order. Wordlists can be enabled individually, reordered and given their own category priorities. Personalisation is off by default and learns from accepted words and their surrounding context when enabled. A correction command presents likely misspellings for review before applying selected changes. Other commands convert an entire note to lowercase, uppercase or sentence case. Trigger length, case preservation and accepting suggestions with Space are configurable. No vocabulary is bundled, and accepting a suggestion always appends a trailing space.

Reviews

No reviews yet.

Stats

1
stars
809
downloads
0
forks
7
days
6
days
7
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
33
commits

Latest Version

README file from

Github

Contributors Forks Stargazers Issues MIT License LinkedIn

About The Project

Wordlist Autocomplete adds editor suggestions to Obsidian from wordlists you control. Point it at a folder of JSON files, enable the ones you want, and every word you type brings up matches from all of them at once — each labelled with the domain and category carried in the JSON.

It is deliberately generic. There is no bundled vocabulary and no bundled spelling dictionary: data.json is an empty {} seed, and everything after that is yours. That makes it useful for domain jargon, a house style guide, a personal glossary, or a controlled vocabulary for a project.

Matching works in three tiers, in this order:

Match Rule Example
prefix Word starts with what you typed orac → Oracle
shorthand Word with its vowels stripped, after the first letter, equals your input orcl → Oracle
contains Word contains your input anywhere base → Database

Suggestions are capped at 10 per keystroke. Ordering is layered: match type first, then the personal score when learning is enabled, then shorter words, then your chosen global order, then alphabetical. Every suggestion shows its domain and category chips so you can tell which wordlist a hit came from.

Beyond the popup, the plugin registers five commands:

  • Correct current file — tokenizes the note, skips exact dictionary matches and common grammatical variations (-s, -ed, -ing, -tion, …), then tries shorthand matching and Levenshtein distance ≤ 2. Candidates above 0.6 confidence appear in a modal with checkboxes; accepted ones are rewritten.
  • Convert file to lowercase / uppercase, Capitalize first letter, Convert to sentence case — whole-file text transforms.

Optional personalization is off by default. When enabled, every accepted suggestion records the word, the word before it and the word after it. A word you have picked before is boosted when the surrounding context matches. The history lives in .obsidian/plugins/wordlist-autocomplete/personalized-suggestions.json.

Accepting a suggestion inserts the word and a trailing space; with Preserve case enabled, the inserted word follows the case style you were typing.

Built With

  • Obsidian
  • JavaScript
  • TypeScript
  • esbuild

Getting Started

Prerequisites

  • Obsidian 0.15.0 or newer.
  • At least one JSON wordlist in your vault (see Usage). There is no bundled wordlist.
  • Node.js and npm only if you intend to work on the bundle.

Installation

From a release

  1. Download main.js, manifest.json and styles.css from the latest GitHub release.
  2. Create <vault>/.obsidian/plugins/wordlist-autocomplete/.
  3. Copy the files into that folder.
  4. Reload Obsidian, then enable Wordlist Autocomplete under Settings → Community plugins.

From source

git clone https://github.com/Elouahabi-Naoufal/obsidian-wordlist-autocomplete.git
cd obsidian-wordlist-autocomplete

main.js is the shipped esbuild bundle and is what Obsidian loads. Copy it, manifest.json and styles.css into the plugin folder. The repository currently does not contain the esbuild config or version-bump script referenced by package.json, and main.ts is an older, much smaller prototype that uses a single mega_wordlist.txt file — it is not the source of the shipped main.js. Consequently npm run build will not reproduce the bundle until the original build files are restored.

Usage

Wordlist format

A wordlist is a flat JSON object. Keys are the words as you want them spelled in the note; values carry the metadata used for display and ranking:

{
  "Oracle": {
    "domain": "Technology",
    "category": "Databases",
    "frequency": 9
  },
  "SQLAlchemy": {
    "domain": "Technology",
    "category": "Databases",
    "frequency": 4
  },
  "conventional_commit": {
    "domain": "Git",
    "category": "Workflow",
    "frequency": 6
  }
}

Only the key is required. Missing frequency defaults to 1, and missing domain/category render as empty chips.

Getting started

  1. Create a folder in your vault for wordlists, for example Wordlists/.
  2. Drop one or more JSON files in it using the format above.
  3. Open Settings → Wordlist Autocomplete, set Dictionary folder to that folder. The plugin scans every .json file in it and lists them, all disabled by default.
  4. Toggle on the files you want. Drag the handle on the left of a row to change its priority.
  5. Type the minimum number of letters in any note. Suggestions appear inline.

Settings

Setting Type Default What it does
Minimum letters to trigger Slider, 1–10 3 Characters required before the popup opens
Enable shorthand matching Toggle on Allow orcl → Oracle
Preserve case Toggle off Insert the suggestion in the case style you were typing
Enable Space to accept Toggle off Accept the highlighted suggestion with Space, not just Enter
Enable personalized suggestions Toggle off Learn from accepted suggestions and boost them next time
Dictionary folder Folder dropdown — Which vault folder to scan for JSON wordlists
Global suggestion order Dropdown File order File order, Category order, Frequency or Alphabetical

Per file you get an enable toggle and a Category order button that opens a modal for ranking the categories inside that particular wordlist. Enable All / Disable All sit above the list.

Commands

Command Effect
Wordlist Autocomplete: Correct current file Modal listing likely misspellings; apply selected fixes
Wordlist Autocomplete: Convert file to lowercase Lowercase the whole note
Wordlist Autocomplete: Convert file to uppercase Uppercase the whole note
Wordlist Autocomplete: Capitalize first letter Sentence-cases the note
Wordlist Autocomplete: Convert to sentence case Sentence-cases the note

The correction pass is deliberately conservative: it skips exact matches, skips anything whose stem is in the dictionary under a common suffix, and requires confidence above 0.6 before offering a change.

Building a wordlist

Any source works — an existing glossary, a frequency list, or a list exported from a book. One compact format that is easy to generate by hand is [frequency][word] per line under -CATEGORY- headers:

-DATABASES-
9Oracle
7PostgreSQL
4SQLAlchemy
-GIT-
8commit
6rebase

A short converter turns that into the JSON the plugin expects:

import json
import re

def convert_to_json(txt_file, domain_name):
    result, current_category = {}, ""
    with open(txt_file, encoding="utf-8") as f:
        for line in f:
            line = line.strip()
            if line.startswith("-") and line.endswith("-"):
                current_category = line[1:-1]
            elif line and current_category:
                match = re.match(r"(\d+)(\w.*)", line)
                if match:
                    result[match.group(2)] = {
                        "domain": domain_name,
                        "category": current_category,
                        "frequency": int(match.group(1)),
                    }
    out = f"{domain_name.lower().replace(' ', '_')}.json"
    with open(out, "w", encoding="utf-8") as f:
        json.dump(result, f, indent=2, ensure_ascii=False)
    print(f"Created {out} with {len(result)} words")

convert_to_json("technology_words.txt", "Technology")

Put the resulting file in your wordlist folder, go back to the settings tab, and enable it.

Roadmap

Working today:

  • Editor suggestions from any number of enabled JSON wordlists
  • Three-tier matching: prefix, vowel-stripped shorthand, contains
  • Domain and category chips on every suggestion
  • Configurable trigger length, shorthand toggle, case preservation, Space-to-accept
  • Per-file enable, drag reordering and per-file category priority
  • Optional personalization with preceding/following word context
  • File-wide correction pass with a review modal
  • Four file-wide case transformation commands

Known gaps:

  • The original build inputs are missing: package.json references esbuild.config.mjs and version-bump.mjs, but neither is in the repository, so npm run build and npm run version fail
  • main.ts is a stale prototype and does not match the shipped main.js
  • Capitalize first letter calls the same sentence-case function as Convert to sentence case, so it does not do what its name says
  • Personalized data is written through vault.adapter to an absolute .obsidian/plugins/... path, while manifest.json declares isDesktopOnly: false; on mobile that write fails
  • Accepted suggestions always append a trailing space; there is no setting to turn that off
  • No tests and no sample wordlist larger than the empty data.json

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

The most useful first contribution is restoring the missing build setup so main.js can be regenerated from TypeScript. Releases are cut by bumping manifest.json, adding the entry to versions.json, tagging, and attaching main.js, manifest.json and styles.css to the release.

Top contributors:

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Naoufal Elouahabi - LinkedIn - [email protected]

Project Link: https://github.com/Elouahabi-Naoufal/obsidian-wordlist-autocomplete

Acknowledgments

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
Completr
5 years ago by tth05
Auto-completion plugin for the obsidian editor.
Frontmatter Tag Sugest
5 years ago by Jonathan Miller
Autocompletes tags in Obsidian YAML frontmatter. No more deleting #!
Editing Toolbar
4 years ago by Cuman
An obsidian toolbar plugin, modified from the Cmenu plugin
MAKE.md
4 years ago by MAKE.md
FuzzyTag
4 years ago by Adrian
Keyshots
4 years ago by KrazyManJ
🔮📝 Obsidian plugin that adds classic hotkey/shortcuts commands from popular IDEs like Visual Studio Code or JetBrains Family.
Emacs text editor
3 years ago by Klojer
Emoji Autocomplete
3 years ago by KraXen72
Emoji Shortcodes Autocomplete for Obsidian
Autocomplete
6 years ago by Yeboster
Obsidian plugin to provide text autocomplete
Multi-line Formatting
5 years ago by nmady
Format Obsidian text over an entire selection, even if that selection has paragraph breaks in the middle!
Go to Line
5 years ago by phibr0
Advanced Cursors
5 years ago by SkepticMystic
InlineAI
2 years ago by FBarrca
MathType
2 years ago by slateblua
Math typing plugin for Obsidian
Vim Marker Sharpener
a year ago by Artem Dvoryadkin
Text formatting commands in Vim mode. Supports applying styles (bold, italic, etc.). Works correctly in visual mode with selected text.
Text Autocomplete
a year ago by Christ Degni
An Obsidian autocomplete plugin
Korean Spellchecker
a year ago by dldisud
Sonkil
a year ago by ohyoungpark
LaTeX autocomplete
a year ago by Yanis Gerst
SlashComplete
a year ago by Spiderpig86
Notion-style Markdown autocompletion for Obsidian.
Lean Terminal
5 months ago by Sascha D. Kasper
Embedded terminal for Obsidian powered by xterm.js and node-pty
Chinese Novel Assistant
3 months ago by pingo888
A set of small features designed to make writing Chinese novels more convenient.
Mention Autocomplete
3 months ago by Darren Zheng
Type `@` to instantly search and link any note in your vault — with full-text search, rendered preview, and smart sentence extraction.
Sectionals
2 months ago by Aaron Bell
Edit Markdown by structure