Thanks to visit codestin.com
Credit goes to github.com

Skip to content

carl0xs/purevim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PureVim - A Plugin-free Neovim Configuration

A clean, efficient Neovim configuration that leverages built-in features and powerful external tools for a great editing experience.

image

Performance

This configuration is designed to be lightweight and fast:

  • No external plugins
  • Lazy redraw enabled
  • Optimized updatetime
  • Efficient autocommands

Features

  • Intuitive keymaps
  • Native LSP support
    • Go to definition: gd
    • Show documentation: K
    • Rename symbol: <leader>rn
    • Code actions: <leader>ca
    • Autocomplete
  • Useful autocommands
    • Diagnostics float mouse hover
    • autoformat
  • File finder
  • Text search
  • Fuzzy Finding Files with preview on Project
  • Greeping with preview on Project

TODOs

  • 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

Requirements

  • Neovim >= 0.10.0
  • A terminal with true color support
  • LSP servers for your languages
  • Lazygit (Install)
  • ripgrep
  • fzf

Installation

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.

1. Installation with 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/nvim

Step 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 develop

Now, you can run nvim from within this shell, and everything will work out of the box.

2. Installation with Helper Script

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 | bash

The 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

3. Manual Installation

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/nvim

Then 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:

nvim

And you’re good to go.

Configuration - Optional User Files

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.

  1. early_init.lua → runs first, can set globals or feature toggles. Users SHOULD customize this file.

  2. init.lua → loads modules conditionally based on feature toggles. User should NOT edit this file.

  3. 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.

1. early_init.lua

  • 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"

Note

Colorschemes

PureVim comes with extra colorschemes:

  • catppuccin (the default)
  • 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
}

2. init.lua

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.

3. 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" })

Contributing

Feel free to fork this repository and customize it to your needs. Pull requests for improvements are welcome!

FAQ

Do folds work with tree-sitter?

Yes!

Here are some folding key hints:

  • zc (fold)
  • zo (unfold)
  • zM (fold all)
  • zR (unfold all)
  • za (toggle current fold)

How do I check if treesitter is turned on on my current buffer?

Focus the buffer you'd like more info to and run the command:

:PureCheckTreesitter

License

MIT License - feel free to use and modify as you like.


Made with love by a Neovim enthusiast

About

A neovim configuration without plugins

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors