Plugins allow you to extend Neovim's capabilities, and add new features.
We recomend using the lazy.nvim package manager to manage all plugins.
To "install" it (download it if it's not already there) and bootstrap it in, add the following to your ~/.config/nvim/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",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
In order to keep things clean, we'll save all plugin configuration in a plugins
folder, and create a dummy init.lua
file:
mkdir ~/.config/nvim/lua/plugins/ && cd ~/.config/nvim/lua/plugins/
echo return {} > init.lua
And add this line to your nvim/init.lua
to import your folder:
require("lazy").setup("plugins")
To add any new plugin, just create a new file inside the plugins
folder.
You can tipically find this code in the instalation instructions of the plugin, but they all follow the same overall scheme due to how lazy.nvim works:
-- example_nvim.lua
return { -- this will be passed to the require("lazy").setup() function
"plugin_guy/example.nvim", -- github repo of the plugin
opts = {}, -- [optional] plugin configuration
dependencies = {} -- [optional] plugin dependencies
}
Note: when installing new plugins, lazy.nvim will show an UI. To exit that UI, just use :q
.
We recomend looking through plugins and slowly integrating them if you think it will benefit your workflow/experience.
As with most things, it's often better to slowly build your tools as you adquire new knowledge than entering nvim blindly with a bunch of plugins you don't know how to use (looking at you, LazyVim).
Here are some of our recomendations:
- nvim-autopairs: Automatic brackets.
- Comment.nvim: Easy commenting/uncommenting.
- todo-comments.nvim: Browse TODOs, FIXMEs, etc.
- which-key.nvim: Shows possible key bindings (when needed; configurable).
- AutoIndent.nvim: Automatic indentation for INSERT mode.
- move.nvim: Easily move lines up and down.
- trouble.nvim: Show warnings and errors.
- telescope.nvim: Fuzzy search files (with previews!).
- nvim-tree: File viewer.
- nvim-cmp Code autocompletion.
- nvim-treesitter: Better syntax highlighting.
- nvim-lspconfig: Language Server Protocol support. Symbols, errors, etc.
- wilder.nvim: Command line autocompletion.
- lualine.nvim: Better, more configurable status bar.
- dashboard-nvim: Fancy start screen.
- nvim-notify: Fancy notifications.
- Catppuccin for (Neo)vim: Fancy colorschemes (also available for other applications!).
- bufferline.nvim: Fancy tabs.
- gitsigns.nvim: Basic Git integrations (see which lines are modified, etc.).
- neogit: Full Git TUI.
-
vimtex:
$\LaTeX$ integration.