A Neovim distribution with AI built in.
Inline autocomplete, inline edit, and an agent that edits your code from a command. Bring your own model: Claude, a local Ollama model, or OpenAI.
:chat editing a file in place. Illustrative demo.
openvim is not a fork of Neovim's C core. It is a config and plugin layer that boots plain Neovim against a bundled setup, so it tracks upstream Neovim for free and stays easy to hack on in pure Lua.
- Inline autocomplete Copilot-style ghost text as you type.
<Tab>to accept. - Inline edit Select code, describe a change, get it rewritten in place.
:chatagent Tell it what to do and it edits the current file directly.- Pluggable backends Claude, Ollama (local, free), or OpenAI. Your choice persists.
git clone https://github.com/natedemoss/openvim
cd openvim
# pick a backend (see "Models" below), then:
nvim -u config/init.luaRequirements: Neovim 0.10+ and curl on PATH.
Put bin/ on your PATH, then launch with one word:
openvim| Platform | Launcher |
|---|---|
| Windows (PS) | bin\openvim.ps1 |
| Windows (cmd) | bin\openvim.cmd |
| macOS / Linux | bin/openvim |
Pick a provider once and openvim remembers it (:OpenvimProvider, saved to
~/.openvim/settings.json).
# Claude (best quality)
export ANTHROPIC_API_KEY=sk-ant-...
# OpenAI
export OPENAI_API_KEY=sk-...
# Ollama (local, free, private) — see models belowopenvim uses two kinds of model: a base model for autocomplete
(fill-in-the-middle) and an instruct model for :chat and inline edit.
Qwen2.5-Coder is the best local
code family right now. Pick a size to match your hardware.
| Model | Size | Best for |
|---|---|---|
qwen2.5-coder:0.5b-base |
0.5 GB | CPU-only, snappiest (~1s) |
qwen2.5-coder:1.5b-base |
1.0 GB | CPU with a little patience |
qwen2.5-coder:3b-base |
1.9 GB | light GPU |
qwen2.5-coder:7b-base |
4.7 GB | GPU, best quality |
| Model | Size | Best for |
|---|---|---|
qwen2.5-coder:1.5b |
1.0 GB | CPU, quick answers |
qwen2.5-coder:7b |
4.7 GB | balanced quality (GPU recommended) |
qwen2.5-coder:14b |
9.0 GB | high quality, needs a real GPU |
deepseek-coder-v2:16b |
8.9 GB | strong alternative |
# CPU-friendly default pairing:
ollama pull qwen2.5-coder:0.5b-base # autocomplete
ollama pull qwen2.5-coder:1.5b # chat / editOn a CPU-only machine, use the small base model for autocomplete. A 7B instruct model on CPU can take minutes per response. A GPU changes everything.
Type in insert mode, pause, and ghost text appears. <Tab> accepts, <C-]> dismisses.
Visually select lines, press <leader>ae (leader is space), and type an instruction:
add input validation
Open a file and tell openvim what to change. It rewrites the file in place.
:chat add type hints and a docstring
:chat refactor this into smaller functions| Command | Description |
|---|---|
:chat / :Chat |
Agent: edit the current file from an instruction |
:OpenvimEdit |
AI-edit the selected lines (use a visual range) |
:OpenvimToggle |
Enable / disable inline autocomplete |
:OpenvimProvider |
Switch backend (claude / ollama / openai) |
:OpenvimStatus |
Show current provider, model, and settings |
Defaults live in config/lua/openvim/init.lua. Override with a table:
require('openvim').setup({
ai = {
provider = 'ollama',
debounce_ms = 250,
models = { ollama = 'qwen2.5-coder:1.5b-base' }, -- autocomplete
chat_models = { ollama = 'qwen2.5-coder:7b' }, -- chat / edit
},
})openvim/
bin/ launchers (openvim, .ps1, .cmd)
config/init.lua entry point (nvim -u)
config/lua/openvim/
init.lua defaults, branding, setup
dashboard.lua start screen
settings.lua persisted user settings
ai/
complete.lua ghost-text autocomplete engine
edit.lua inline edit on a selection
agent.lua :chat whole-file agent
backends/ claude.lua, ollama.lua, openai.lua
Backends expose two calls: complete() for fill-in-the-middle autocomplete and
ask() for instruction-following chat and edits.
MIT