Neovim Configuration ==================== Neovim configuration with lazy.nvim for plugin management Date: February 7, 2026 Neovim is my primary text editor, configured with a modern setup using lazy.nvim for plugin management. ## Features - **lazy.nvim** - Fast, modern plugin manager - **LSP** - Language Server Protocol for IDE-like features - **Treesitter** - Better syntax highlighting and parsing - **fzf/telescope** - Fuzzy finding for files, buffers, and more - **Git integration** - Gitsigns, fugitive, and diffview ## Setup ### Installation Via mise (recommended): ```bash mise install neovim ``` Or from source/package manager: ```bash # Ubuntu/Debian sudo apt install neovim # Arch Linux sudo pacman -S neovim # macOS brew install neovim ``` ### Configuration Structure ``` nvim/.config/nvim/ ├── init.lua # Entry point ├── lazy-lock.json # Plugin lockfile └── lua/ ├── config/ │ ├── keymaps.lua # Key bindings │ ├── options.lua # Vim options │ └── lazy.lua # Plugin manager setup └── plugins/ # Individual plugin configs ``` ## Plugin Categories ### Core - **lazy.nvim** - Plugin manager - **plenary.nvim** - Lua utility library - **nvim-web-devicons** - File type icons ### LSP & Completion - **nvim-lspconfig** - LSP configuration - **mason.nvim** - LSP server installer - **nvim-cmp** - Completion engine - **LuaSnip** - Snippet engine ### Fuzzy Finding - **telescope.nvim** - Fuzzy finder framework - **telescope-fzf-native** - Native fzf integration - **telescope-ui-select** - UI selection enhancement ### Git - **gitsigns.nvim** - Git decorations in gutter - **vim-fugitive** - Git commands - **diffview.nvim** - Enhanced diff viewing ### UI - **lualine.nvim** - Status line - **bufferline.nvim** - Tab-like buffer line - **nvim-tree.lua** - File explorer - **which-key.nvim** - Keybinding helper - **indent-blankline.nvim** - Indentation guides ### Editing - **nvim-treesitter** - Syntax tree parser - **vim-surround** - Surround text objects - **vim-commentary** - Comment toggling - **nvim-autopairs** - Auto-close brackets - **vim-sleuth** - Automatic indentation detection ### Themes - **tokyonight.nvim** - Main color scheme ## Key Concepts ### Lazy Loading Plugins are loaded on demand to improve startup time: ```lua -- Load only when opening a file { "nvim-treesitter", event = "BufReadPost" } -- Load on specific command { "neo-tree.nvim", cmd = "Neotree" } -- Load on key mapping { "telescope.nvim", keys = { "<leader>ff", "<leader>fg" } } ``` ### LSP Setup Language servers are configured via mason and lspconfig: ```lua require("mason").setup() require("mason-lspconfig").setup({ ensure_installed = { "lua_ls", "rust_analyzer", "pyright" } }) ``` ### Custom Keymaps All keymaps are in `lua/config/keymaps.lua`: ```lua -- Leader key vim.g.mapleader = " " -- Quick save vim.keymap.set("n", "<leader>w", "<cmd>w<cr>") -- Better window navigation vim.keymap.set("n", "<C-h>", "<C-w>h") vim.keymap.set("n", "<C-j>", "<C-w>j") vim.keymap.set("n", "<C-k>", "<C-w>k") vim.keymap.set("n", "<C-l>", "<C-w>l") ``` ## Daily Workflow ### File Navigation - `<leader>ff` - Find files - `<leader>fg` - Live grep - `<leader>fb` - Find buffers - `<leader>fh` - Help tags ### Code Navigation - `gd` - Go to definition - `gr` - Go to references - `gi` - Go to implementation - `K` - Hover documentation ### Git - `]c` / `[c` - Next/previous hunk - `<leader>hs` - Stage hunk - `<leader>hr` - Reset hunk - `<leader>hp` - Preview hunk ## Performance Tips 1. **Check startup time**: `nvim --startuptime startup.log` 2. **Profile plugins**: `:Lazy profile` 3. **Disable unused providers**: ```lua vim.g.loaded_python3_provider = 0 vim.g.loaded_ruby_provider = 0 vim.g.loaded_perl_provider = 0 vim.g.loaded_node_provider = 0 ``` ## See Also <div class="embed-card embed-card-external"> <a href="https://lazy.folke.io/" class="embed-card-link" target="_blank" rel="noopener noreferrer"> <div class="embed-card-image"> <img src="https://lazy.folke.io/img/docusaurus-social-card.jpg" alt="" loading="lazy"> </div> <div class="embed-card-content"> <div class="embed-card-title">🚀 Getting Started | lazy.nvim</div> <div class="embed-card-description">lazy.nvim is a modern plugin manager for Neovim.</div> <div class="embed-card-meta">lazy.folke.io</div> </div> </a> </div> <div class="embed-card embed-card-external"> <a href="https://github.com/neovim/nvim-lspconfig" class="embed-card-link" target="_blank" rel="noopener noreferrer"> <div class="embed-card-image"> <img src="https://opengraph.githubassets.com/d301edf1504d34a463691768935c6a17d8a22c0604814244b6d76a4bec5fbba6/neovim/nvim-lspconfig" alt="" loading="lazy"> </div> <div class="embed-card-content"> <div class="embed-card-title">GitHub - neovim/nvim-lspconfig: Quickstart configs for Nvim LSP</div> <div class="embed-card-description">Quickstart configs for Nvim LSP. Contribute to neovim/nvim-lspconfig development by creating an account on GitHub.</div> <div class="embed-card-meta">GitHub &middot; github.com</div> </div> </a> </div> <div class="embed-card embed-card-external"> <a href="https://github.com/nvim-telescope/telescope.nvim" class="embed-card-link" target="_blank" rel="noopener noreferrer"> <div class="embed-card-image"> <img src="https://opengraph.githubassets.com/4b7f15f421a5ab83f0101c41d5aa1bb38e144e81229384d40cc9ff4a2bab8b82/nvim-telescope/telescope.nvim" alt="" loading="lazy"> </div> <div class="embed-card-content"> <div class="embed-card-title">GitHub - nvim-telescope/telescope.nvim: Find, Filter, Preview, Pick. All lua, all the time.</div> <div class="embed-card-description">Find, Filter, Preview, Pick. All lua, all the time. - nvim-telescope/telescope.nvim</div> <div class="embed-card-meta">GitHub &middot; github.com</div> </div> </a> </div> <div class="embed-card"> <a href="/helix/" class="embed-card-link"> <div class="embed-card-content"> <div class="embed-card-title">Helix Editor</div> <div class="embed-card-description">Helix - a post-modern modal text editor</div> <div class="embed-card-meta">Feb 7, 2026</div> </div> </a> </div>