📖 Neovim Docs | 🛠️ Lazy.nvim | 🎨 Neovim
This is a Neovim configuration using Lazy.nvim as the plugin manager. It provides an optimized and modern setup with essential settings, key mappings, and a structured plugin management system.
- Neovim 0.9+ (latest version is recommended)
- Git (for cloning Lazy.nvim)
- tmux (if you want clipboard integration)
- wl-clipboard (for Wayland users)
Clone this repository into your Neovim config directory:
mkdir -p ~/.config/nvim
cd ~/.config/nvim
git clone <your-repo-url> .
Launch Neovim, and Lazy.nvim will automatically install the necessary plugins.
nvim
The init.lua
file initializes the configuration by requiring the necessary modules:
require('config.vim').setup() -- Load Vim settings
require('config.lazy') -- Load Lazy.nvim plugin manager
require('config.maps') -- Load key mappings
This file contains essential Neovim settings, such as:
- Relative line numbers
- Clipboard integration
- Auto-indentation and tab settings
- Split window behaviors
- Mouse support
Example configurations from vim.lua
:
vim.opt.number = true -- Show line numbers
vim.opt.relativenumber = true -- Relative line numbers
vim.opt.clipboard = "unnamedplus" -- Use system clipboard
vim.opt.termguicolors = true -- Enable true color support
Clipboard setup for Wayland:
vim.g.clipboard = {
name = "wayland",
copy = {
["+"] = "wl-copy --type text/plain",
["*"] = "wl-copy --type text/plain",
},
paste = {
["+"] = "wl-paste --no-newline",
["*"] = "wl-paste --no-newline",
},
cache_enabled = true,
}
This file bootstraps Lazy.nvim, ensuring it's installed and configured correctly:
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
end
vim.opt.rtp:prepend(lazypath)
Plugins are managed using:
require("lazy").setup({
spec = {
{ import = "config.plugins" },
},
install = { colorscheme = { "habamax" } },
checker = { enabled = true },
})
- Open Neovim:
nvim
- Lazy.nvim will install missing plugins on the first run.
- Use
:Lazy
inside Neovim to open the Lazy.nvim interface.
To install plugins, add them to the config/plugins/nvim-telescope.lua
file. Example:
return {
{ "nvim-telescope/telescope.nvim", dependencies = { "nvim-lua/plenary.nvim" } },
}
Then run:
nvim
:Lazy sync
- Modify
config/plugins.lua
to add or remove plugins. - Customize
config/maps.lua
for custom key mappings.
- 📖 Neovim Docs
- 🛠️ Lazy.nvim
- 🎨 Neovim
Enjoy your optimized Neovim setup! 🚀