A minimal, fast, opinionated Neovim config built on LazyVim
Tuned for C++ / Python / Rust development β with a personality.
This is a production-ready personal Neovim config on top of LazyVim's solid foundation β not a framework, not a distribution. Just a carefully curated setup that stays out of your way while you code.
The design goal is simple: fast startup, predictable behavior, and a workflow that feels modern without abandoning Vim's core strengths. Every plugin earns its place. Every keymap has a reason.
- π One-key multi-language runner β F5 compiles and runs C++, Python, or Rust in a persistent bottom terminal, with smart process management (interrupt β recompile, auto-restart on crash)
- β‘ SnipRun integration β run small code snippets or selections instantly inside the editor (inline / floating) via
<leader>r, ideal for quick logic testing without leaving the buffer - π Buffer-centric navigation β Bufferline with ordinal numbers and
<leader>t1β9direct jumps, matching the muscle memory of browser tab navigation - π¨ Catppuccin Mocha with transparent background and a custom blue cursor tied to the palette
- π₯ Animated fire cursor via smear-cursor.nvim β because why not
- π¬ Self-roast dashboard β 220 rotating programmer quotes on startup. Motivational in the only honest way
- π§ Smart insert-mode escape (
jk) that detects when you're mid-word and doesn't interrupt normal typing - β¬οΈ Jump-past-closing-bracket in insert mode (
<C-l>) β skip),},],"without reaching for Escape or arrow keys - π Mode-aware cursor shapes β block in Normal, beam in Insert, underline in Replace
- π’ Relative line numbers that switch to absolute in Insert mode automatically
- π Clang-tidy linting on every C/C++ write
- π§© Minimal plugin footprint β ~33 total plugins, mostly LazyVim defaults, zero bloat
Extend LazyVim. Don't fight it.
This config treats LazyVim as infrastructure, not a starting point to tear down. Plugins are overridden via opts merging, not reimplemented. The plugin set is deliberately small β if something doesn't directly improve the editβrunβdebug loop, it probably isn't here.
Priorities, in order:
- Speed β fast startup, responsive editing
- Correctness β behavior should be predictable and consistent
- Ergonomics β common actions should be effortless
- Aesthetics β the environment should feel good to be in
What this config is not:
- A showcase of every Neovim feature
- A port of VS Code
- A config that changes every week
Leader key:
<Space>
| Key | Mode | Action |
|---|---|---|
<F5> |
Normal / Insert / Terminal | Compile & run current file (C++ / Python / Rust) |
<leader>k |
Normal / Insert / Terminal | Toggle focus between code and terminal |
| Key | Mode | Action |
|---|---|---|
<leader>t1 β <leader>t9 |
Normal | Jump to buffer by ordinal position |
<leader>tt |
Normal | New buffer tab |
<leader>tc |
Normal | Smart close current buffer |
<leader>to |
Normal | Close all other buffers |
<S-h> / <S-l> |
Normal | Previous / Next buffer (LazyVim default) |
| Key | Mode | Action |
|---|---|---|
jk |
Insert | Escape to Normal (skips if mid-word) |
<C-l> |
Insert | Jump past next closing bracket or quote |
| Key | Action |
|---|---|
<leader>/ |
Search in current buffer |
<leader>ff |
Find files |
<leader>fg |
Live grep |
<leader>fb |
Browse open buffers |
<leader>fr |
Recent files |
nvim/
βββ init.lua # Bootstrap only β requires config.lazy
βββ lazyvim.json # LazyVim extras (currently none)
βββ lazy-lock.json # Locked plugin versions
βββ lua/
βββ config/
β βββ lazy.lua # Plugin manager setup & performance opts
β βββ options.lua # Editor options, cursor shape, colorscheme hook
β βββ keymaps.lua # All custom keymaps + F5 runner logic
β βββ autocmds.lua # Custom autocommands
β βββ quotes.lua # 220 fun programmer quotes for the dashboard
βββ plugins/
βββ colorscheme.lua # Catppuccin Mocha (transparent) + Tokyonight fallback
βββ dashboard.lua # Snacks dashboard with custom header + random quote
βββ bufferline.lua # Ordinal buffer numbers
βββ ui.lua # Smear-cursor with fire style
βββ lsp.lua # Clangd, Pyright, Rust-analyzer
βββ lint.lua # Clang-tidy for C/C++
βββ render-markdown.lua # Markdown rendering in-buffer
| Plugin | Purpose |
|---|---|
catppuccin/nvim |
Colorscheme β Mocha flavour, transparent background |
folke/tokyonight.nvim |
Kept lazy as a fallback colorscheme |
sphamba/smear-cursor.nvim |
Animated cursor trail (fire style) |
mfussenegger/nvim-lint |
Linting engine β runs clang-tidy on C/C++ files |
MeanderingProgrammer/render-markdown.nvim |
Renders Markdown with syntax, tables, and formatting inline |
| Plugin | Purpose |
|---|---|
akinsho/bufferline.nvim |
Buffer tab bar with ordinal numbering |
folke/snacks.nvim |
Dashboard, file picker, buffer deletion, and more |
neovim/nvim-lspconfig |
LSP client configuration |
mason-org/mason.nvim |
LSP / linter installer |
nvim-treesitter |
Syntax highlighting and text objects |
blink.cmp |
Fast completion engine |
conform.nvim |
Code formatting on save |
flash.nvim |
Lightning-fast cursor jumping |
gitsigns.nvim |
Git change indicators in the gutter |
trouble.nvim |
Diagnostics panel |
grug-far.nvim |
Project-wide find and replace |
mini.pairs |
Auto-close brackets and quotes |
mini.ai |
Extended text objects (a, i) |
noice.nvim |
Replaced command line and notification UI |
which-key.nvim |
Keymap popup guide |
persistence.nvim |
Session save and restore |
todo-comments.nvim |
Highlight and search TODO/FIXME/HACK comments |
- Startup time kept low by disabling unused built-in plugins:
gzip,tarPlugin,tohtml,tutor,zipPlugin - Smear-cursor loads on
VeryLazyβ deferred until after startup is complete - Render-markdown is filetype-gated (
ft = { "markdown" }) β zero cost unless you open a.mdfile - Plugin updates are checked silently in the background (
checker.notify = false) β no popup noise on startup - All plugins pinned via
lazy-lock.jsonβ reproducible installs, no surprise breakage from upstream changes version = falseacross all plugins β always tracks latest git commit, not semver tags
Press <F5> from any C++, Python, or Rust file. The runner:
- Saves the current file
- Opens a persistent
12-line terminal split at the bottom (or reuses the existing one) - Sends an interrupt (
Ctrl-C) to stop any running process - Compiles and runs:
- C++:
g++ file.cpp -o out && ./out - Python:
python3 file.py - Rust:
cargo runif aCargo.tomlexists, otherwiserustcdirectly
- C++:
- Returns focus to the code window automatically
The terminal is persistent across runs β it stays open and reuses the same window. If the terminal process dies unexpectedly, the runner detects this and restarts it cleanly.
Works from Normal, Insert, and Terminal mode. Filenames with spaces or special characters are shell-escaped safely.
<leader>rβ run current line or selection- Output inside Neovim (inline / floating)
- For quick logic checks β not full programs
- No interactive input (
cin,scanf) - Not for multi-file execution
- Test a loop, condition, or small snippet instantly
- Avoid recompiling the entire program
The jk β <Esc> mapping includes word-boundary detection. If the character immediately before the cursor is a letter (i.e., you're mid-word), jk types literally. Only triggers escape at word boundaries.
This means typing object, reject, jacket in insert mode works normally without misfiring.
In insert mode, if the cursor is sitting just before ), }, ], ", or ', pressing <C-l> moves the cursor past it instead of inserting a literal character. Pairs naturally with mini.pairs auto-closing β type the open bracket, write content, <C-l> to exit.
Normal / Visual β Block cursor (β)
Insert β Beam cursor (|)
Replace β Underline (_)
Cursor color is pinned to Catppuccin blue (#89b4fa) and re-applied automatically after every colorscheme load so it survives :colorscheme resets.
The startup dashboard picks one of 220 programmer quotes at random on every launch. They range from gently ironic to brutally honest. No inspirational nonsense.
Your code works best when you don't touch it.
Quote selection uses vim.uv.hrtime() as the random seed β no repeated sequences across sessions.
Requirements:
- Neovim
β₯ 0.10 - Git
- A Nerd Font (for icons)
g++(for C++ runner)python3(for Python runner)cargo/rustc(for Rust runner)clangdandclang-tidy(auto-installed via Mason)nodeβ₯ 16 (required by Mason for some LSP servers)
Install:
# Back up existing config if you have one
mv ~/.config/nvim ~/.config/nvim.bak
# Clone this config
git clone https://github.com/singh-prithvi/nvim-config ~/.config/nvim
# Launch Neovim β lazy.nvim bootstraps automatically
nvimOn first launch, LazyVim will install all plugins. Mason will then install the language servers (clangd, pyright, rust-analyzer) in the background.
| Dependency | Version | Purpose |
|---|---|---|
| Neovim | β₯ 0.10 | Required |
| Git | any | Plugin management |
| Nerd Font | any | Icons and glyphs |
| Node.js | β₯ 16 | Mason LSP installer |
g++ |
any | C++ compilation (F5 runner) |
python3 |
any | Python execution (F5 runner) |
cargo / rustc |
any | Rust compilation (F5 runner) |
clangd |
any | C/C++ LSP (auto-installed by Mason) |
clang-tidy |
any | C/C++ linting (auto-installed by Mason) |