Neovim plugins extend the editor with new features: syntax highlighting, fuzzy search, git integration, language servers, autocomplete. The plugin ecosystem is large and powerful.
A plugin manager downloads and manages plugins. Popular managers:
Most new setups use lazy.nvim.
git clone --filter=blob:none --sparse https://github.com/folke/lazy.nvim.git ~/.local/share/nvim/lazy/lazy.nvim
Then in init.lua:
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.loop.fs_stat(lazypath) then vim.fn.system({"git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath}) end vim.opt.rtp:prepend(lazypath) require("lazy").setup("plugins")
Create ~/.config/nvim/lua/plugins/init.lua with plugin specs.
-- ~/.config/nvim/lua/plugins/init.lua return { -- Syntax highlighting { "nvim-treesitter/nvim-treesitter", run = ":TSUpdate", }, -- Fuzzy finder { "nvim-telescope/telescope.nvim", dependencies = { "nvim-lua/plenary.nvim" }, }, -- LSP framework { "neovim/nvim-lspconfig", dependencies = { "williamboman/mason.nvim" }, }, -- Autocomplete { "hrsh7th/nvim-cmp", dependencies = { "hrsh7th/cmp-nvim-lsp" }, }, -- Git signs { "lewis6991/gitsigns.nvim", }, -- Colorscheme { "folke/tokyonight.nvim", }, }
After adding plugin specs, run :Lazy sync (with lazy.nvim). This downloads, installs, and cleans up.
:Lazy update — update all plugins.
:Lazy clean — remove unused plugins.
:Lazy log — view recent changes.
Most plugins need setup. Example for lspconfig:
require("lspconfig").pyright.setup({}) -- Python language server
For complex setup (many plugins), organize into files:
~/.config/nvim/ ├── init.lua ├── lua/ │ ├── plugins/ │ │ ├── init.lua -- list of plugins │ │ ├── lsp.lua -- lsp setup │ │ └── telescope.lua -- telescope config │ └── config.lua
Then require in init.lua:
require("config") require("plugins.lsp") require("plugins.telescope")