Raja's Exocortex

neovim

neovim is a spritual successor to vim. nvim is actively developed, so following the releases, and setting up the plugins and config is an excellent way for highly productive engineers to waste time.

Here's how to quickly get started with nvim with a usable config. Tested on Ubuntu 24.04.

Quick Start

Installing nvim

The version of nvim that ships with Ubuntu LTS releases is probably obsolete and cannot run modern plugins.

  1. Grab the latest nvim release tar.gz and put it in /opt/nvim folder. Ensure you have /opt/nvim/bin/nvim.

  2. Run ln -s ../../../opt/nvim/bin/nvim /usr/local/bin/nvim to put nvim the shell $PATH.

Quick Setup

Get TJ DeVries' (core nvim dev) excellent quick start config https://github.com/nvim-lua/kickstart.nvim.

# Install deps
sudo apt install ripgrep gcc make unzip git

# Backup old nvim config if present and clone TJ's kickstart config
[-d ~/.config/nvim ] && mv ~/.config/nvim ~/.nvim.0
git clone --depth=1 https://github.com/nvim-lua/kickstart.nvim.git ~/config/nvim

# Run nvim and wait for the plugin installs to complete
nvim

Enabling Custom Plugins

In ~/.config/nvim/init.lua enable the custom.plugins folder to load custom plugins scripts.

  --  Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
  { import = 'custom.plugins' },

Put any custom plugins in the ~/.config/nvim/lua/custom/plugins/*.lua folder.

Example: to install the obsidian.nvim plugin, create a file called ~/.config/nvim/lua/custom/plugins/obsidian.lua with the contents of the lazy.vim config.

AI/LLM Integration

โ„น๏ธ Avante setup instructions from the README.md does not work with TV DeVries' kickstart LazyVim config. TODO: fix this.

neovim has excellent LLM integration using the avante plugin https://github.com/yetone/avante.nvim.

YouTube demos:

Note, that using @codebase in the prompt uses the entire code base in the LLM context.