doc: add code completion section to README

This commit is contained in:
Levi Neely 2026-05-03 15:52:31 +02:00
parent 9cb9b21113
commit b22030827a
1 changed files with 36 additions and 0 deletions

View File

@ -76,6 +76,42 @@ The input window accepts multi-line prompts. Queued prompts are held until the c
The mode line shows the active session ID and current state (`idle` or the running state name). The mode line shows the active session ID and current state (`idle` or the running state name).
## Code Completion
`ellie-complete` provides ghost-text code completion via a copilot session on ollie-9p. Press `M-/` to request a completion at point; the result appears as gray italic ghost text.
| Key | Action |
|-----|--------|
| `M-/` | Request completion at point (or for selected region) |
| `TAB` / `RET` | Accept the suggestion |
| Any other key | Dismiss |
| `M-/` (while ghost visible) | Request a new completion (retries preserve region) |
With an active region, the completion replaces the selected text. Without a region, it inserts after the current line.
### Configuration
| Variable | Env var | Description |
|----------|---------|-------------|
| `ellie-complete-backend` | `OLLIE_COMPLETE_BACKEND` | Backend for completion (required) |
| `ellie-complete-model` | `OLLIE_COMPLETE_MODEL` | Model for completion (required) |
| `ellie-complete-prefix-max` | — | Max chars of context before point (default: 4000) |
| `ellie-complete-suffix-max` | — | Max chars of context after point (default: 1000) |
Example:
```elisp
(setq ellie-complete-backend "ollama")
(setq ellie-complete-model "qwen3:4b")
```
Or via environment / `~/.config/ollie/env`:
```
OLLIE_COMPLETE_BACKEND=ollama
OLLIE_COMPLETE_MODEL=qwen3:4b
```
## License ## License
GPLv3 GPLv3