My Neovim Configuration: Keeping It Minimal
For me, using Neovim (or Vim in general) is about having the minimum necessary to work on any project quickly and, above all, with high performance. Over the last few years of using Vim, I've experienced its incredible level of customization and vast variety of plugins - you can literally create an IDE tailored to your exact preferences.
The IDE Recreation Problem
Here's the thing that bothers me: if you're going to recreate an IDE in Neovim, wouldn't it be simpler to just download VSCode and install a plugin that simulates Vim keybindings and modes?
I've done exactly that - used VSCode with Vim extensions, and it worked great. I've also used Zed editor with Vim configuration. Both work perfectly fine for an IDE-like experience with Vim motions.
The Plugin Trap
In recent weeks, I wanted to return to using Vim (Neovim specifically), but not by trying to recreate an IDE. Most times I see a configuration guide, you end up with an immense amount of plugins and configurations that you ultimately don't take full advantage of.
That's why I've created a base configuration which I believe is the minimum I need to use Neovim and take advantage of both Vim's core (without plugins) and its configuration capabilities.
My Minimal Setup
Here's what I actually use:
- lazy.nvim: As a package manager
- telescope.nvim: For fuzzy finding files and text
- nvim-lspconfig: For language server support
That's it. Basically, that's all I need to work.
File Structure
nvim/
├── init.lua # Main entry point
├── lua/
│ ├── config/
│ │ └── lazy.lua # Plugin manager setup
│ └── plugins/
│ ├── lspconfig.lua # LSP configuration
│ └── telescope.lua # Telescope configuration
└── lazy-lock.json # Locked plugin versions
Base Configuration (init.lua)
require("config.lazy")
vim.opt.relativenumber = true -- Relative numbers for navigation
vim.g.mapleader = " " -- Space as leader key
vim.cmd.colorscheme("darkblue") -- Simple dark theme
LSP Setup
In the example configuration, I'm only using lspconfig with Intelephense (for PHP), but you can configure any LSP you need for whatever project you're working on:
return {
'neovim/nvim-lspconfig',
tag = 'v2.5.0',
init = function()
vim.lsp.enable('intelephense')
end
}
Telescope Configuration
Simple keymaps for the most common operations:
return {
'nvim-telescope/telescope.nvim',
tag = '0.1.8',
dependencies = { 'nvim-lua/plenary.nvim' },
init = function()
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' })
vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = 'Telescope live grep' })
vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' })
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' })
end
}
Why This Works for Me
This way I feel like I can reinstall Vim on any computer without feeling like I'm downloading a tangled mess of configurations and plugins that end up consuming resources or just getting in the way.
It's minimalist, and for me, it's the best way to learn Vim. I think there are so many things that Vim's core offers that sometimes get forgotten when you pile on plugins.
Rediscovering Vim's Core
Without dozens of plugins doing everything for you, you actually learn:
- Text objects and motions
- Vim's powerful search and replace
- Macros and registers
- Split and window management
- The built-in file explorer
- Buffer management
These are features that are already there, performant, and powerful - no plugins needed.
The Honest Truth
This is just my humble opinion. Who knows, maybe I'll end up with an immense configuration again, recreating VSCode all over again. But for now, this minimal setup keeps me focused on actually learning Vim rather than configuring it.
If you want to check out the full configuration, it's available on my GitHub repository.
Final thought: If your Neovim config has more lines than the project you're working on, maybe it's time to reconsider.