Completion Features
marimo’s completion engine integrates multiple sources to provide comprehensive suggestions:- Jedi: Fast, accurate Python code completion for standard library and third-party packages
- Variable completion: Context-aware completion of variables defined in your notebook
- AI-powered completion: Inline suggestions using GitHub Copilot, Codeium, or custom models
- Language Server Protocol (LSP): Enhanced completions from pylsp and other language servers
Basic Code Completion
Code completion activates automatically as you type, suggesting:- Variable names from your notebook cells
- Module and package names
- Function and method names
- Class attributes and methods
- Keywords and built-in functions
Signature Hints
When calling functions, marimo displays signature hints showing parameter names, types, and default values. This helps you understand function APIs without leaving your code.Configure signature hints
Configure signature hints
You can control when signature hints appear:Or configure through the editor settings menu.
marimo.toml
AI-Powered Completions
marimo supports AI copilots that provide intelligent, context-aware code suggestions as you type, similar to GitHub Copilot in VS Code.GitHub Copilot
The marimo editor natively supports GitHub Copilot, an AI pair programmer that suggests entire lines or blocks of code. Setup:- Install Node.js (required for the Copilot language server)
- Enable Copilot via the settings menu in the marimo editor
- Authenticate with your GitHub account when prompted

GitHub Copilot is not yet available in the conda distribution. Please install marimo using
pip or uv if you need Copilot support.marimo.toml:
marimo.toml
- HTTP settings: Configure proxy for network connections
- Telemetry: Control telemetry data collection (
"off","crash","error", or"all") - GitHub Enterprise: Configure your enterprise server URL
Codeium (Windsurf)
Windsurf (formerly Codeium) provides fast, free AI-powered code completions. Setup:- Sign up at windsurf.com
- Download and install the Windsurf app
- Copy your API key from the Windsurf app (Cmd/Ctrl+Shift+P → “Copy API Key”)
- Configure in marimo settings or add to your config:
marimo.toml
Custom Copilot Models
You can integrate custom LLM providers for code completion, allowing you to use internal providers, local models (e.g., Ollama), or any OpenAI-compatible service.marimo.toml
- Local models via Ollama
- Internal company LLM services
- OpenAI, Anthropic, Google with your own API keys
- Any OpenAI-compatible provider
Language Server Integration
marimo integrates with Python language servers to enhance code completion with type information, documentation, and more intelligent suggestions.Python LSP Server (pylsp)
The Python Language Server Protocol implementation provides:- Context-aware completions
- Type-based suggestions
- Documentation on hover
- Code actions and quick fixes
pyproject.toml
Completion Configuration
Configuration File
Edit yourmarimo.toml to customize completion behavior:
marimo.toml
Via Settings Menu
Access completion settings through:- Open settings (⚙️ icon in top-right)
- Navigate to “Completion” tab
- Adjust settings visually
Settings configured in
pyproject.toml or script metadata take precedence over user configuration and cannot be changed through the UI.Completion Shortcuts
Key bindings for completion:| Action | Default Shortcut |
|---|---|
| Trigger completion | Tab or Ctrl/Cmd+Space |
| Accept suggestion | Tab or Enter |
| Next suggestion | ↓ or Ctrl+n |
| Previous suggestion | ↑ or Ctrl+p |
| Dismiss | Esc |
Best Practices
Write descriptive variable names
Write descriptive variable names
Descriptive names help the completion engine provide better suggestions and make your code more maintainable.
Leverage type hints
Leverage type hints
Type annotations improve completion accuracy, especially with LSP enabled:
Use imports at the cell level
Use imports at the cell level
Import packages in cells where you use them for better completion context:
Troubleshooting
Completions not appearing
Completions not appearing
- Check that
activate_on_typingis enabled in settings - Try manually triggering with
Ctrl/Cmd+Space - Verify Jedi is installed:
pip list | grep jedi - Restart the marimo server
GitHub Copilot not working
GitHub Copilot not working
- Ensure Node.js is installed:
node --version - Check authentication status in settings
- Verify network connectivity (Copilot requires internet)
- Check logs in
~/.cache/marimo/logs/for errors
Slow completions
Slow completions
- Disable LSP if not needed: Set
enabled = falsefor language servers - Reduce signature hints: Set
signature_hint_on_typing = false - Check for large imported modules that may slow analysis
Related Documentation
- AI-Assisted Coding - Full-cell AI generation and refactoring
- Language Server Protocol - Enhanced code intelligence
- Keyboard Shortcuts - Completion keybindings
- Configuration - Detailed configuration options