a conjure operator for neovim

Magic with motions.

Target text with any motion, whisper an intent, and the change is transmuted in place — while you keep editing, narrated live, reversible with a single u.

I. Target
~ip
any motion or text object
II. Incant
“add error handling”
plain language, <Up> recalls past spells
III. Transmute
async splice, one undo step
-- the summoning { "vim-pro/conjurer.nvim", opts = {} }
no reagents required — claude, codex, or gemini is found automatically
The scrying glass watch the spell work — the region locks, the model narrates, the buffer stays yours
fetch.lua  
NORMAL fetch.lua a counterspell (:ConjureCancel) leaves the file byte-identical 15:4

The laws of casting

deep Vim fidelity is the whole discipline
First law
All magic is reversible
One conjure, one undo step. The result flashes when it lands — u un-conjures, entirely. Rather look before it settles? review = true opens a diff against the buffer as it was.
Second law
A spell spoken once echoes
The intent is captured at the cast. . repeats it over any new target — no prompt, ever again.
Third law
Spells keep in bottles
:let @r = "add type hints" bottles a spell; "r~ip uncorks it anywhere — even mid-macro.
Fourth law
A counterspell costs nothing
Nothing touches the buffer while the spell is in the air. :ConjureCancel always leaves the file byte-identical.

The many-handed cast

one intent, every site in the quickfix list — :h conjurer-aggregate
:ConjureAll convert these prints to structured logging
lua/fetch.lua18log.info("fetching", { id = id })
lua/fetch.lua42log.warn("retrying", { attempt = n })
lua/store.lua67print("saving " .. key)
lua/store.lua103print("-- debug --")
lua/legacy.lua9print(vim.inspect(cfg)) provider timed out
·lua/legacy.lua31print("done")
applied in flight left alone errored ·queued reverted
signs, <Tab> to diff a site, and dd to cancel one come from quickfix-pro — without it the edits simply land undecorated
The summoning circle
Any list will do
Fill the list with Vim's own verbs — :grep, LSP references, :cexpr — prune it with :Cfilter or just delete rows, then cast. A bare grep hit grows to the smallest syntax node starting on its line, so a four-line call is transmuted whole.
The reckoning
The list is the review
Walk it with :cnext — entries follow the text as it changes, so you judge each site in its real surroundings. :ConjureRejectSite restores one exactly, :ConjureRetrySite sends it back with a word of feedback, and :ConjureRejectAll unwinds the batch, killing what is still in flight.
The binding
Six casts would pick three conventions
So one of them teaches the rest. Cast a single pilot with :ConjureNext, fix it until it is right, then :ConjureAll — your approved text rides along as the exemplar every remaining site must match. Nothing the model wrote alone sets the convention.
The second casting
Cast it again, freely
Only queued and failed sites fire, so settled work is never disturbed — :grepadd what the search missed and run it again. And the intent becomes ~'s remembered spell, so a site no search would find is one motion away.

Familiars

bring your own — local, hosted, or homemade
The bond
Choose your familiar
Claude, Codex, or Gemini CLI, auto-detected — the Anthropic, OpenAI, or Gemini API with a key, ollama, or any Lua function — the provider protocol is 20 lines.
The ward
Ward what is precious
Every cast sends the snippet and context to your provider. Keep secret buffers behind a local familiar you control.

The spell circle

motion first, then cast — :h conjurer-mappings
~
Why ~? Vim’s own 'tildeop' exists solely to make it an operator. Its old power — flipping case — still lives at g~. Transmutation, but bigger.
Pick a target. Cast.
{ "vim-pro/conjurer.nvim", opts = {} }
MIT