Before starting, ensure you have:
- neovim (duh)
- a patched font and a terminal that supports glyphs
cd ~/.config/ && git clone https://github.com/Hadi493/nvim
- On first boot, run
:PlugInstallto ensure all plugins are installed and updated with vim-plug - Key maps are in
lua/config/mappings.lua- Leader is bound to space, you can press space by itself for which-key to pop up with bindings info
- Neovim options are set in
lua/config/options.luawith some comments for info - All plugin configuration is located in the
lua/plugins/folder- To add or remove plugins, modify the
Plug()section ininit.luaappropriately, and ensure to modifyrequire()as needed for configuration. - Then run
:PlugInstallto install or:PlugCleanto uninstall
- To add or remove plugins, modify the
Yes, there are a lot of choices! But don't worry, you can easily change your mind later.
1. Do you want:
- Minimal?
- Power User?
- Full IDE?
An example directory structure and plugin configuration for each of those is included below.
2. Choose directory structure
- If you prefer vimscript, use an
init.vim - Otherwise, use an
init.lua - If you intend to have a lot of plugins or want a neater structure, split into separate files
- You can always expand to more files later
3. Pick plugin manager
- vim-plug is a minimal option
- lazy.nvim is more feature-rich
- or several other choices
4. Pick plugins
- Awesome neovim plugins list
- See below for a rough guide on types of plugins
5. Set mappings, options, and plugin config
- Use
:help optionsor browse here - You don't always need to configure plugins: most have sensible defaults, and you can set as few or as many opts as you wish.
~/.config/nvim/
βββ init.vim
Plugins might include:
- File tree
- Fuzzy finder
- Comment quick toggle
- Surround editing
- Better syntax highlighting
- Probably a color scheme and status line
~/.config/nvim/
βββ init.lua
βββ lua
βββ core
βΒ Β βββ keymaps.lua
βΒ Β βββ options.lua
βββ plugins
βββ plugin.lua
βββ configs.lua
Plugins might include:
- Everything above, AND
- LSP & autocompletion
- Snippets
- Git integration
- Faster motions, window management
- Terminal integration
- Project and session management
- Tabline and cursorline
~/.config/nvim/
βββ init.lua
βββ lazy-lock.json
βββ lua
βββ core
βΒ Β βββ keymaps.lua
βΒ Β βββ options.lua
βΒ Β βββ plugins.lua
βββ plugins
βΒ Β βββ lots.lua
βΒ Β βββ of.lua
βΒ Β βββ plugin.lua
βΒ Β βββ configs.lua
βββ UltiSnips
βββ tex.snippets
Plugins might include:
- Everything above, AND
- Debugging
- Code runners
- Remote development
- Refactoring