A clean, efficient Neovim configuration that leverages built-in features and powerful external tools for a great editing experience.
This configuration is designed to be lightweight and fast:
- No external plugins
- Lazy redraw enabled
- Optimized updatetime
- Efficient autocommands
- Intuitive keymaps
- Native LSP support
- Go to definition:
gd - Show documentation:
K - Rename symbol:
<leader>rn - Code actions:
<leader>ca - Autocomplete
- Go to definition:
- Useful autocommands
- Diagnostics float mouse hover
- autoformat
- File finder
- Text search
- Fuzzy Finding Files with preview on Project
- Greeping with preview on Project
- Look for TODOs in the code
- Document how to install tree-sitter libraries
- Document how to install supported LSP servers
- Document how to add new LSP servers
- Document how to "auto complete"
- Document default bindings
- Customize auto-format functions
- Generalize symbols for errors, warnings, info to be global
- Neovim >= 0.10.0
- A terminal with true color support
- LSP servers for your languages
- Lazygit (Install)
- ripgrep
- fzf
You can install PureVim in three different ways, depending on how much control or automation you prefer:
1 - With Nix — for a fully reproducible environment. 2 - With a helper script — for quick setup and dependency checking. 3 - Manually (Purist way) — for full control, no scripts or Nix.
This configuration uses Nix with Flakes to provide a reproducible environment with all necessary dependencies.
Step 1. Install Nix
First, install Nix on your system and enable Flakes.
Step 2. Clone the Repository
Clone this repository to your Neovim configuration directory:
# Backup your existing config first if you have one
# mv ~/.config/nvim ~/.config/nvim.backup
git clone https://github.com/carl0xs/purevim.git ~/.config/nvimStep 3. Launch the Environment
Navigate to the configuration directory and run nix develop. This will launch
a shell with Neovim and all the pre-configured language servers
(rust-analyzer, lua-language-server, typescript-language-server)
available in your PATH.
cd ~/.config/nvim && nix developNow, you can run nvim from within this shell, and everything will work out of
the box.
If you don’t want to use Nix, a convenience script is provided to handle the setup and dependency checks for you.
Run the installer:
curl -fsSL https://raw.githubusercontent.com/carl0xs/purevim/master/bin/purevim | bashThe script will:
- Back up your existing Neovim configuration (if any) to ~/.config/nvim.backup
- Clone this repository to ~/.config/nvim
- Check for the required dependencies and alert you if something is missing
- Dependencies checked by the script:
- nvim
- lazygit
- rg (ripgrep)
- fzf
- lua-language-server
- rust-analyzer
- typescript-language-server
- bat
If you prefer a completely transparent setup — no scripts, no abstractions — install manually:
mv ~/.config/nvim ~/.config/nvim.backup 2>/dev/null || true
git clone https://github.com/carl0xs/purevim.git ~/.config/nvimThen manually ensure all dependencies are installed on your system:
- nvim (≥ 0.10.0)
- lazygit
- rg (ripgrep)
- fzf
- lua-language-server
- rust-analyzer
- typescript-language-server
- bat
Once everything is ready, just launch Neovim:
nvimAnd you’re good to go.
This Neovim configuration supports user-specific optional files to customize behavior without modifying the main config. All these files are git-ignored by default.
If you'd like to customize PureVim, simply create these files in the same
folder as this config init.lua.
-
early_init.lua→ runs first, can set globals or feature toggles. Users SHOULD customize this file. -
init.lua→ loads modules conditionally based on feature toggles. User should NOT edit this file. -
post_init.lua→ runs last, for final tweaks and personal customization. Users SHOULD customize this file.
⚡ If a file does not exist, it is simply skipped, and the config runs normally.
-
Purpose: Runs before the main config.
-
Use it for: Setting global options, overriding defaults, changing leader keys, or defining feature toggles.
-
Example:
-- Or change the default colorscheme (see "Colorschemes" section below)
vim.g.purevim_colorscheme = "gruvbox"You can also turn PureVim special features on/off, or even customize its
setup. Just comment/uncomment what you need!
vim.g.purevim_features = {
-- colorscheme = false, -- disable colorscheme
-- dashboard = false, -- disable dashboard
-- fzf = { -- configure FZF or set to false to disable
-- position = "bottom",
-- width_ratio = 1,
-- height_ratio = 0.3,
-- border = "none",
-- },
-- lsp = false, -- disable LSP
-- lazygit = false, -- disable lazygit
}This file orchestrates how everything is loaded with PureVim. DO NOT use
this to add your own configs. Instead use early_init.lua or post_init.lua.
- Purpose: Runs after all core modules have loaded.
- Use it for: Adding personal keymaps, tweaks, custom autocommands, or modifying highlights after the colorscheme.
- Example:
-- Custom keymap
vim.keymap.set("n", "<leader>tt", ":split | terminal<CR>", { desc = "Open terminal" })
-- Tweak statusline colors after colorscheme
vim.api.nvim_set_hl(0, "StatusLine", { fg = "#cdd6f4", bg = "#11111b" }) vim.api.nvim_set_hl(0,
"StatusLineNC", { fg = "#a6adc8", bg = "#292c3c" })Feel free to fork this repository and customize it to your needs. Pull requests for improvements are welcome!
Yes!
Here are some folding key hints:
- zc (fold)
- zo (unfold)
- zM (fold all)
- zR (unfold all)
- za (toggle current fold)
Focus the buffer you'd like more info to and run the command:
:PureCheckTreesitter
MIT License - feel free to use and modify as you like.
Made with love by a Neovim enthusiast