Beyond the Chatbot: Why ThePrimeagen/99 is the AI Neovim Deserves
Here is a breakdown of why this project is gaining traction and how you can get it running in your local setup.
Most AI plugins for editors feel like "chatbots glued to the side." You have to stop typing, open a window, and explain context. 99 aims to be a "Neovim AI agent done right" by focusing on
Contextual Awareness
It understands the buffer you are actually working in.
Minimal Friction
It’s designed by ThePrimeagen (a known Vim/Rust enthusiast), meaning it prioritizes speed and keyboard-centric workflows.
Action-Oriented
Instead of just "talking" about code, it's built to perform edits and refactors directly where your cursor is.
Since this is a Neovim plugin, the easiest way to install it is using a plugin manager like lazy.nvim.
You will need an API key for the LLM provider you plan to use (usually Anthropic or OpenAI).
Add this to your Neovim configuration (usually init.lua or a specific plugins/ai.lua file)
return {
"ThePrimeagen/99",
dependencies = {
"nvim-lua/plenary.nvim",
},
config = function()
require("99").setup({
-- Configuration options go here
-- You'll typically set your preferred model and API keys
model = "claude-3-5-sonnet-20240620",
})
end
}
Once installed, the power of 99 lies in its commands. While the project is evolving rapidly, the core idea is to use a "telemetry" style approach to code generation.
Imagine you have a messy JavaScript function. Instead of copying it to a browser, you simply highlight the code or place your cursor inside and run the command
:[99] refactor this to use async/await and add error handling
What happens next
99 gathers the local context (the function and surrounding lines).
It sends the request to the LLM.
It streams the changes back into your buffer, often showing a diff so you can approve the change.
To make this truly "the right way," you should map the agent to a leader key. This keeps your hands on the home row
-- Remap <leader>ai to trigger a 99 prompt
vim.keymap.set("n", "<leader>ai", ":99 ", { desc = "Trigger AI Agent" })
-- Remap to execute a quick fix on a visual selection
vim.keymap.set("v", "<leader>ai", ":99 ", { desc = "Refactor Selection" })
99 isn't just a wrapper; it's a tool built for people who live in the terminal. It treats AI as a sub-process of your editor, not a separate destination.