avante.nvim setup: Cursor-style AI coding in Neovim

Learn to configure avante.nvim with GPT-4o mini, apply code edits in Neovim, and troubleshoot a Python random forest classification script.

Player not loading? Watch on YouTube

Alex demonstrates avante.nvim as an open source coding assistant for Neovim with a workflow he compares to Cursor. The tutorial was uploaded on October 31, 2024; no recording date or plugin version is supplied. Its setup reflects that period, using GPT-4o mini through OpenAI rather than a local LLM. The demonstrated workflow requires a provider API key and does not establish offline operation.

The setup uses lazy.nvim and API keys stored in environment variables. Alex describes Claude as the default provider at the time, then configures OpenAI instead. He also advises checking the project's installation instructions because they may change. The examples use leader-AA for the sidebar and leader-AE for edits to selected code, with Space as his configured leader key.

A short Bash example fixes a date command that fails on macOS. The longer Python exercise builds a random forest classifier for workout types, adds model saving and prediction functions, and generates a README and requirements.txt. Alex demonstrates reviewing individual changes, accepting all suggestions, and manually copying chat history into a file.

The exercise also shows mistakes that need intervention: an incorrect target-column assumption, misplaced prediction logic, and a string-to-float error addressed with one-hot encoding. The final script prints predictions, but the tutorial does not report an accuracy evaluation.