Auto Linker

approved

by MrDanRave

Semantic auto-linking: underlines text that matches a note title and offers one-click wiki-link insertion. - This plugin has not been manually reviewed by Obsidian staff.

232 downloadsUpdated 1mo ago

Auto Linker

Surfaces the links you would have made by hand. As you write, Auto Linker quietly underlines the words that match your other notes and offers a one‑click wiki‑link — ranked by a confidence score (not a blind text match), so you get to choose the useful links and not the noise.

Screen Recording 2026-06-25 135225

This software was vibe-coded.


Why it's different

Auto Linker always suggests and never links on its own. It also remembers your decisions to improve its suggestions over time using a weighted model. Most "auto link" tools do a binary match: a word either equals a note title or it doesn't - Auto Linker instead computes a confidence score for every candidate and only shows the ones that clear a threshold you control. That score blends several signals:

  • Lexical match — how closely the text matches a note's title (exact, stemmed, or a close typo).
  • Significance — common words (the, and, from) score low; distinctive words score high. No hard stop‑word list; it's graded, and self‑tunes to your vault via IDF.
  • CapitalizationAND reads differently from and; ALL‑CAPS / TitleCase get a boost, lowercase function words a penalty.
  • Note importance — well‑linked "hub" notes rank higher (PageRank over your link graph).
  • Semantic meaning (optional) — an on‑device embedding model re‑ranks candidates by meaning.
  • Learned preference — it learns from the links you actually make and the suggestions you accept.

How a suggestion is made

Every candidate follows the same pipeline. Steps 5–8 only nudge the score up or down — a note is eliminated only at the steps marked .

  1. Tokenize — the text is split into tokens (keeping intra‑word bits like the dot in 802.1q), noting where phrase vs anchor separators fall.
  2. Skip zones ⤫ — spans inside [[links]], #tags, inline `code` and ``` fenced blocks are excluded up front.
  3. Index lookup ⤫ — each contiguous run of tokens (never crossing an anchor separator) is looked up as a sub‑phrase (≥ 2 words) or a single token, plus digit‑base and typo variants; a note only becomes a candidate if it shares one — notes with nothing in common never enter.
  4. Reject & self‑link filter ⤫ — a span→note you've rejected (per‑note or vault‑wide), or the note you're currently editing, is dropped before scoring.
  5. Lexical score — how textually complete the match is: whole title = 1.0; a sub‑phrase or single word = the share of the title's information (IDF) it covers; a digit‑base × 0.85; a typo × (1 − edits ⁄ length).
  6. Significance — distinctive words score high, common ones low (frequency list + your vault's IDF); a multi‑word span is judged by its rarest word.
  7. Capitalization — a lone AND / Database gets a boost and a lowercase common word a penalty; neutral for multi‑word spans.
  8. Importance · meaning · learned — adds PageRank (hub notes), semantic similarity (if the model is on) and your accept history (if any), then renormalizes everything to a single 0–1 confidence.
  9. Threshold ⤫ — candidates that don't clear the Sensitivity bar are dropped.
  10. Dedup ⤫ — adjacent same‑note spans merge into one; among overlapping spans only the highest‑confidence one survives (ties broken toward the more‑linked note).
  11. Show — survivors are underlined with an approve/reject tooltip: a solid underline means text decided it, a dotted one means meaning was the deciding lift.

In short, a note drops out when it shares no word (3), sits in a skipped/rejected/self region (2, 4), scores too low (9), or loses to an overlapping better match (10).

Features

  • Scored, ranked suggestions with a single sensitivity dial controlling suggestion noise.
  • Per‑signal weight sliders — tune the balance yourself; restore defaults anytime.
  • Smart tokenizer — handles 802.1Q, Topic : Subtopic, client-server, and path‑like titles via configurable separator rules.
  • Sub‑phrase matching — a contiguous run of a title's words matches the whole note (typing method 3 - CAD suggests Payment method 3 - CAD), scored by how much of the title it covers.
  • Typo tolerancedatabse still finds Database; bounded so it stays quiet.
  • Multi‑word titles & aliases, including a distinctive word standing in for the whole (krugerDunning‑Kruger).
  • Learned aliases — link [[Dinosaur|raptor]] once and raptor can suggest Dinosaur thereafter, given a confident score.
  • Reject memory — dismiss a suggestion per‑note or vault‑wide; manage and restore them in settings.
  • Hover to preview the target note, approve (✓), or reject (✗) inline.
  • Approve shortcutsCtrl/Cmd + ✓ inserts a bare [[Note]] (no display alias); Shift + ✓ approves every repeat of that suggestion in the note at once.
  • Skips [[existing links]], #tags, inline `code` and ``` fenced blocks.
  • Never links a note to itself — nudging you toward atomic, outward‑defined notes.

Privacy

Everything runs locally. The index, scores, reject list, learned aliases, and the optional embedding cache all stay on your device — no telemetry, no external API. The only network event in the whole plugin is the optional, one‑time download of the embedding model when you turn the semantic tier on (it carries no note data, and can be avoided entirely by pointing at a model you already have).

The semantic tier (optional, off by default)

Turning on Semantic meaning loads a small embedding model that re‑ranks suggestions by meaning. When you enable it you choose:

  • Download the default multilingual model (Xenova/paraphrase-multilingual-MiniLM-L12-v2, ~50 MB, once), or
  • Use local model — point at a transformers.js‑format model already on disk (air‑gapped / your own).

Use Settings → "Index vault for semantics" to pre‑compute every note's "meaning fingerprint" so meaning‑based ranking is ready across the whole vault immediately.

The semantic tier re‑ranks literal candidates — it refines what the text match already found. It does not discover links for text with no word in common with a note title (e.g. typing "star wars" won't surface a Sci-Fi note). Add an alias for that.

Semantic suggestions have a dotted underline.

Rule‑based stemming covers Latin/Cyrillic scripts; Semitic Hebrew/Arabic morphology is left to the multilingual embedding model rather than faked.

Install

Manually: copy main.js, manifest.json, and styles.css (if present) into <vault>/.obsidian/plugins/auto-linker/, then enable it in Settings → Community plugins.

Via BRAT: add this repository as a beta plugin, then enable Auto Linker in the Community Plugins list.

Usage

  1. Start typing. Matching spans get a subtle underline (a dotted underline means the match was lifted by meaning rather than text alone).
  2. Hover a suggestion to preview the target, then to insert [[Note|text]] or to dismiss.
    • Ctrl/Cmd + ✓ inserts a bare [[Note]] instead of [[Note|text]].
    • Shift + ✓ approves every repeat of that suggestion in the current note.
  3. Dismissed suggestions are staged in the "reject across vault" panel — click a truncated entry to expand it — and can be escalated to vault‑wide or reviewed and restored under Settings → Rejected suggestions.
  4. Tune Sensitivity and the Signal weights in settings to match how you work.

Build from source

npm install
npm run dev      # watch mode — pairs with the Hot-Reload plugin
npm run build    # production build → main.js

Built with esbuild; the embedding backend (@xenova/transformers) is bundled and lazy‑loaded only when the semantic tier is enabled.

License

GPL-3.0-only

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.