Neovim Configuration
This setup uses LazyVim as a base with custom plugins and keybindings optimized for Python, Rust, and web development.
Quick Start
bash
# Open Neovim
nvim
# Or use the alias
nOn first launch, LazyVim will automatically install all plugins.
Structure
nvim/.config/nvim/
├── init.lua # Entry point
├── lazyvim.json # LazyVim configuration
└── lua/
├── config/
│ ├── autocmds.lua # Auto commands
│ ├── keymaps.lua # Custom keybindings
│ ├── lazy.lua # Plugin manager setup
│ └── options.lua # Editor options
└── plugins/
├── coding.lua # Completion, snippets
├── colorscheme.lua
├── editor.lua # File explorer, search
├── lsp.lua # Language servers
└── ui.lua # UI enhancementsKey Mappings
Leader key is <Space>.
General
| Key | Action |
|---|---|
<Space> | Show which-key menu |
<Space>e | Toggle file explorer |
<Space>ff | Find files |
<Space>fg | Live grep |
<Space>fb | Browse buffers |
<Space>fr | Recent files |
File Explorer (Neo-tree)
| Key | Action |
|---|---|
<Space>e | Toggle explorer |
a | Add file/directory |
d | Delete |
r | Rename |
c | Copy |
m | Move |
y | Copy path |
LSP
| Key | Action |
|---|---|
gd | Go to definition |
gr | Go to references |
K | Hover documentation |
<Space>ca | Code actions |
<Space>cr | Rename symbol |
<Space>cf | Format document |
]d | Next diagnostic |
[d | Previous diagnostic |
Git
| Key | Action |
|---|---|
<Space>gg | Open lazygit |
<Space>gf | Git file history |
<Space>gb | Git blame |
]h | Next hunk |
[h | Previous hunk |
<Space>hp | Preview hunk |
<Space>hs | Stage hunk |
<Space>hr | Reset hunk |
Windows & Buffers
| Key | Action |
|---|---|
<C-h/j/k/l> | Navigate windows |
<Space>- | Split horizontal |
<Space>| | Split vertical |
<S-h> | Previous buffer |
<S-l> | Next buffer |
<Space>bd | Delete buffer |
Terminal
| Key | Action |
|---|---|
<C-/> | Toggle terminal |
<Space>ft | Float terminal |
<Esc><Esc> | Exit terminal mode |
Plugins
UI & Navigation
| Plugin | Purpose |
|---|---|
| neo-tree | File explorer |
| telescope | Fuzzy finder |
| which-key | Keybinding hints |
| bufferline | Buffer tabs |
| lualine | Status line |
Coding
| Plugin | Purpose |
|---|---|
| nvim-cmp | Completion engine |
| LuaSnip | Snippets |
| nvim-autopairs | Auto brackets |
| Comment.nvim | Smart comments |
| nvim-surround | Surround text |
LSP & Diagnostics
| Plugin | Purpose |
|---|---|
| nvim-lspconfig | LSP configuration |
| mason | LSP installer |
| conform.nvim | Formatting |
| nvim-lint | Linting |
| trouble.nvim | Diagnostics panel |
Git
| Plugin | Purpose |
|---|---|
| gitsigns | Git decorations |
| lazygit.nvim | Lazygit integration |
| diffview | Diff viewer |
Language Support
Python
- LSP:
pyright - Formatter:
ruff - Linter:
ruff - Debugger:
debugpy
lua
-- Auto-activate virtual environments
vim.g.python3_host_prog = "~/.virtualenvs/neovim/bin/python"Rust
- LSP:
rust-analyzer - Formatter:
rustfmt
TypeScript/JavaScript
- LSP:
typescript-language-server - Formatter:
biomeorprettier - Linter:
biomeoreslint
Go
- LSP:
gopls - Formatter:
gofmt
Colorscheme
Uses Catppuccin Mocha for a consistent look across all tools.
lua
-- lua/plugins/colorscheme.lua
return {
"catppuccin/nvim",
name = "catppuccin",
priority = 1000,
opts = {
flavour = "mocha",
transparent_background = false,
integrations = {
cmp = true,
gitsigns = true,
neo_tree = true,
telescope = true,
treesitter = true,
which_key = true,
},
},
}Tips
Update Plugins
vim
:Lazy updateCheck Health
vim
:checkhealthMason (LSP Manager)
vim
:MasonTelescope Commands
vim
:Telescope keymaps " Search keybindings
:Telescope help_tags " Search help
:Telescope commands " Search commands