Web-Lookup

approvedunreviewed

by insekt

Hold Ctrl + hover a word, click to search it on the web. Works in the editor, reading view and PDFs.

โ†“ 38 downloadsUpdated 7d agoMIT

๐ŸŒ Web-Lookup

An Obsidian plugin for instant web searches

Hold Ctrl, hover over a word, and click โ€” that's a web lookup.

Web-Lookup preview

Settings โ†’ behavior

SettingMeaning
Open in browserExternal system browser, or the built-in Web viewer core plugin (desktop). Falls back to external if Web viewer is off/unavailable.
Open in tabNew tab / current tab (Web viewer only).
Search engineGoogle, DuckDuckGo, Bing, Yandex, Baidu.
Modifier key (extra)Ctrl by default; Alt/Shift/Cmd available (Ctrl+click is "right click" on macOS).
Let Obsidian handle links (extra)Ctrl+click on links keeps its normal behavior.
DelimitersUnicode word boundaries (Intl.Segmenter, handles CJK/Thai), whitespace only, or whitespace + custom characters.
PunctuationSplit: punctuation separates tokens ยท Keep inside words: don't, well-known stay whole, edges trimmed ยท Keep all: punctuation stays attached.
Case sensitivity / NormalizationApplied to the search string only (preserve / lower / upper; none / NFC / NFD / NFKC / NFKD / strip diacritics). They never invalidate caches.

Caching

Tokenization works on "blocks" (editor line, reading-view paragraph, PDF page). Token boundaries per block are cached, keyed by a hash of the block text, so stale data is impossible.

  • RAM cache โ€“ per file, recency ordered.
    • Sliding window = yes: only the N most recently used blocks per file stay in memory.
    • no: unbounded per file; a global 1M-token limit evicts least-recently-used files.
  • Permanent cache โ€“ one JSON per file in <plugin>/cache/, written ~4 s after new blocks are cached. A file is written to disk when:
    • its extension is in always file types (default pdf), or it is inside an always directory, or
    • every threshold that is > 0 is met: file unmodified for โ‰ฅ N days (mtime threshold) and cached tokens โ‰ฅ N (token-count threshold). Both 0 = this rule is off.
    • Disk caches are discarded automatically when the file's mtime/size or the tokenizer settings change.
  • Lazy loading โ€“ yes: a file's disk cache is read the first time you use that file. no: all cache files are loaded at startup.

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.