AI Autocomplete

approved

by leoyishou

This plugin has not been manually reviewed by Obsidian staff. Inline AI writing completion with ghost text. Powered by Groq. Tab to accept.

2 stars111 downloadsUpdated 23d agoMIT

AI Autocomplete

AI inline writing completion for Obsidian, powered by OpenAI-compatible APIs. The default setup routes through OpenRouter to the Groq provider for fast inference.

Type naturally and get ghost text suggestions that appear inline. Press Tab to accept, Esc to dismiss.

Features

  • Ghost text completion — transparent suggestions appear at your cursor, like GitHub Copilot
  • Context-aware — reads text before and after cursor for coherent continuations
  • Insight-oriented — can surface sharper questions, hidden assumptions, analogies, and reframes for personal knowledge notes
  • Fast — defaults to OpenRouter's Groq provider with throughput-prioritized routing
  • Bilingual — automatically detects and continues in Chinese or English
  • Lightweight — 6KB plugin, no dependencies

Usage

  1. Install the plugin
  2. Go to Settings → AI Autocomplete → enter your OpenRouter API key
  3. Start writing — suggestions appear after a brief pause
KeyAction
TabAccept suggestion
EscDismiss suggestion
Keep typingSuggestion auto-dismisses

Settings

SettingDefaultDescription
API base URLhttps://openrouter.ai/api/v1/chat/completionsAny OpenAI-compatible chat completions endpoint
Modelopenai/gpt-oss-120b:nitroSmart default via OpenRouter's Groq provider
System promptBuilt-in heuristic promptEditable prompt that controls ghost text style and insight behavior
Reasoning effortminimalKeeps reasoning models fast enough for inline autocomplete
Hide reasoningOnExcludes reasoning tokens from suggestion text
ProvidergroqForces OpenRouter's Groq provider
Provider sortthroughputPrioritizes high token throughput
Allow fallbacksOffKeeps requests on the selected provider
Trigger delay800msHow long to wait after typing before fetching a suggestion
EnabledOnToggle via settings or command palette

How it works

The plugin uses CodeMirror 6 extensions to render transparent "ghost text" at the cursor position. When you pause typing, it sends the surrounding context (up to 2000 chars before + 500 chars after cursor) to the configured API and displays the completion as inline ghost text.

License

MIT

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.