Inline Completions
Ghost-text code suggestions that appear as you type, powered by Misar AI across 30+ programming languages.
Overview
Inline completions deliver AI-powered code suggestions directly inside the editor as ghost text — the same pattern you may know from other AI coding tools. Suggestions appear automatically as you type and can be accepted with a single keystroke.
Enabling / Disabling
Inline completions are controlled by the misar.inlineCompletions setting.
- Open Settings (
Cmd+,/Ctrl+,) - Search for
misar inline completions - Toggle Misar Code: Inline Completions
{
"misar.inlineCompletions": true
}
Accepting and Rejecting Suggestions
| Action | Keyboard Shortcut |
|--------|-------------------|
| Accept suggestion | Ctrl+Enter or Tab |
| Reject suggestion | Escape |
| Accept next word only | Ctrl+Right |
If Tab conflicts with your existing tab-completion keybindings, use Ctrl+Enter as the primary accept key.
Supported Languages
Inline completions are active for 30+ languages:
Web
TypeScript, JavaScript, TSX, JSX, HTML, CSS, SCSS, JSON
Systems
Rust, C, C++, Go, Zig
Backend
Python, Java, Kotlin, C#, PHP, Ruby, Scala
Mobile
Swift, Dart (Flutter), Objective-C
Data & Scripts
SQL, Shell/Bash, PowerShell, Lua, R, YAML, TOML
Other
Markdown, Dockerfile, Terraform (HCL), GraphQL
Completions are disabled for file types outside this allowlist to avoid unnecessary API calls in non-code contexts (e.g., plain text, log files).
How It Works
- You type in a supported language file.
- A debounced trigger fires after a short idle period.
- The extension sends the file prefix, suffix, and language ID to the
/completebackend endpoint. - The AI returns a single-token or multi-line completion.
- The suggestion appears as grey ghost text inline.
- Press
Ctrl+EnterorTabto insert it.
Trigger-Kind Guard
Misar Code uses VS Code's trigger-kind API to suppress completions when the cursor move was caused by navigation (arrow keys, mouse click, page-up/down) rather than typing. This significantly reduces unnecessary API calls and keeps the suggestion latency low when you are actively writing.
Performance Tips
If completions feel slow on large files, reduce the context window sent to the backend by setting "misar.completionContextLines": 50 (default: 100).
- Keep files under 1,000 lines for the fastest completions — the backend trims context automatically, but smaller files mean less trimming overhead.
- Disable completions in generated files (e.g.,
*.generated.ts) by adding them tomisar.completionExcludePatterns.
Configuration Reference
| Setting | Type | Default | Description |
|---------|------|---------|-------------|
| misar.inlineCompletions | boolean | true | Enable or disable inline completions globally |
| misar.completionContextLines | number | 100 | Lines of context sent before and after the cursor |
| misar.completionDebounceMs | number | 300 | Idle delay in ms before triggering a completion |
| misar.completionExcludePatterns | string[] | [] | Glob patterns for files to exclude from completions |