When your LSP error might as well be Sanskrit
wtf.nvim turns cryptic Neovim diagnostics into plain English (and fixes) via AI, without leaving your editor.

What it does
wtf.nvim intercepts the diagnostic under your cursor in Neovim—error, warning, or hint—and routes it to an AI provider or search engine. You get back an explanation of what broke and why, or in “vibe coding” mode, a direct fix. It works with any LSP-enabled language and supports seven AI backends plus Google, Stack Overflow, and others.
The interesting bit
The plugin is essentially a context-gathering layer: it packages the diagnostic message, the offending code snippet, file type, and severity into a prompt, then hands that to Claude, GPT-4, Ollama, or whatever you’ve configured. The “automagic fixing” mode skips the explanation entirely and just rewrites your code. There’s also a history system that stores every chat locally and lets you grep through it later—useful when the same error keeps coming back.
Key highlights
- Seven AI providers supported: Anthropic, Copilot, DeepSeek, Gemini, Grok, Ollama, OpenAI
- Three picker integrations for history search: Telescope, Snacks.nvim, FZF-lua
- Web search opens directly from Neovim, with local file paths stripped for cleaner queries
- Custom hooks for statusline updates while requests are in flight
:WtfYankcopies diagnostics to clipboard—surprisingly handy for pasting into Slack
Caveats
- Requires
plenary.nvimandnui.nvimas hard dependencies - AI features need API keys set via environment variables; no key management built in
- Tests require live API keys and will skip providers you haven’t configured
Verdict
Grab this if you stare at LSP errors daily and want explanations without context-switching to a browser. Skip it if you already have a terminal AI workflow you like, or if you’re allergic to adding another API key to your dotfiles.