My personal Neovim configuration based on LazyVim, optimized for Python AI agent development.
Before installing, you MUST have:
- Neovim >= 0.9.0
- Git
- A Nerd Font installed and set in your terminal
ripgrepandfd(orfd-findon Ubuntu/Debian)
See Prerequisites below for detailed installation commands.
- 🐍 Python LSP with Pyright for type checking and completions
- ⚡ Ruff for fast linting and formatting
- 🐛 Debugpy for Python debugging
- 🔄 Virtual environment detection - automatically detects venv/.venv
- 💾 Auto-save on file changes
- 🖥️ Persistent terminals with ToggleTerm
- 🎨 Gruvbox colorscheme
- 📄 PDF viewer integration with Zathura
- 🔧 Quality of life improvements for coding
- Neovim >= 0.9.0
- Git
- A Nerd Font (for icons) - Install from nerdfonts.com
- ripgrep (for telescope searching)
- fd or fd-find (for file finding)
# Install Neovim
sudo add-apt-repository ppa:neovim-ppa/unstable
sudo apt update
sudo apt install neovim
# Install dependencies
sudo apt install git ripgrep fd-find python3-venv
# Fix fd vs fdfind naming issue
sudo rm /usr/bin/fd 2>/dev/null
sudo ln -s /usr/bin/fdfind /usr/bin/fd
# Optional: Install Zathura for PDF viewing
sudo apt install zathura# Install Neovim
brew install neovim
# Install dependencies
brew install git ripgrep fd
# Optional: Install Zathura for PDF viewing
brew install zathura- Python 3.8+ with
python3-venvpackage
The following will be installed automatically when you first open Neovim:
pyright- Python LSP serverruff- Python linter/formatterdebugpy- Python debugger
Note: These Python tools are installed by Mason inside Neovim, but you need Python itself installed on your system first.
- Backup existing config (if you have one):
mv ~/.config/nvim ~/.config/nvim.backup
mv ~/.local/share/nvim ~/.local/share/nvim.backup
mv ~/.local/state/nvim ~/.local/state/nvim.backup- Clone this repository:
git clone https://github.com/YOUR_USERNAME/YOUR_REPO_NAME.git ~/.config/nvim- Launch Neovim:
nvimOn first launch, Lazy will automatically:
- Install all plugins
- Download LSP servers, linters, and formatters
- Set up the environment
- Wait for installation to complete, then restart Neovim.
To update plugins:
nvimThen press <Space>l to open Lazy, then press U to update all plugins.
If you see an error about string.buffer module not found:
Option 1: Wait for it to be fixed upstream (recommended)
:Lazy update blink.cmpOption 2: Disable fuzzy matching
Create ~/.config/nvim/lua/plugins/blink.lua:
return {
{
"saghen/blink.cmp",
opts = {
fuzzy = { enable = false },
},
},
}sudo ln -s /usr/bin/fdfind /usr/bin/fd~/.config/nvim/
├── init.lua # Main entry point
├── lua/
│ ├── config/
│ │ ├── autocmds.lua # Auto commands (markdown diagnostics disabled)
│ │ ├── keymaps.lua # Custom keymaps
│ │ ├── lazy.lua # Lazy.nvim plugin manager setup
│ │ └── options.lua # Neovim options
│ └── plugins/
│ ├── colorscheme.lua # Gruvbox theme
│ ├── completion.lua # Completion settings (currently empty, using blink.cmp default)
│ ├── pdfview.lua # PDF viewer integration (<Space>p)
│ ├── python.lua # Python LSP, Ruff, debugpy, venv selector
│ ├── qol.lua # Auto-save & ToggleTerm
│ └── telescope.lua # Telescope file finder config
└── README.md # This file
See nvim-keybinds.md for a comprehensive cheat sheet.
| Key | Action |
|---|---|
<Space><Space> |
Find files |
<Space>/ |
Search in project |
<Space>e |
Toggle file explorer |
<Space>tt |
Toggle terminal |
<Ctrl-1> |
Windows/splits cheatsheet |
<Ctrl-s> |
Save file |
gd |
Go to definition |
gr |
Find references |
<Space>ca |
Code actions |
<Space>cf |
Format file |
<Space>cv |
Select Python venv |
Create a new file in ~/.config/nvim/lua/plugins/:
-- ~/.config/nvim/lua/plugins/my-plugin.lua
return {
{
"username/plugin-name",
opts = {
-- plugin options
},
},
}Edit files in ~/.config/nvim/lua/config/ or override plugin configs in ~/.config/nvim/lua/plugins/.
- lazy.nvim - Plugin manager (auto-installed)
- LazyVim - Neovim starter config (base layer)
- telescope.nvim - Fuzzy finder
- ripgrep - Fast text search
- fd/fd-find - Fast file finder
- nvim-lspconfig - LSP client
- mason.nvim - LSP/tool installer
- pyright - Python type checker
- ruff - Python linter/formatter
- debugpy - Python debugger
- nvim-dap - Debug Adapter Protocol
- nvim-dap-python - Python debugging integration
- venv-selector.nvim - Virtual environment picker
- gruvbox.nvim - Color scheme
- auto-save.nvim - Auto-save files
- toggleterm.nvim - Better terminal integration
- nvim-cmp or blink.cmp - Autocompletion
- zathura - PDF viewer (for
<Space>pkeybind)
- Open project:
cd your-project && nvim - Select venv:
<Space>cv - Find files:
<Space><Space> - Open terminal:
<Space>tt - Format code:
<Space>cf
- Open terminal in split:
<Space>th - Run Claude Code CLI in the terminal
- Edit files in Neovim
- Switch between terminal and editor with
<Ctrl-h/j/k/l>
:Lazy sync:MasonThen install pyright and ruff manually.
:Lazy profilerm -rf ~/.local/share/nvim ~/.local/state/nvim ~/.cache/nvim
nvimMIT