packer.nvim - A use-package inspired plugin manager for Neovim
feline.nvim - A minimal, stylish and customizable statusline for Neovim written in Lua
nvim-lspconfig - A collection of common configurations for Neovim’s built-in language server client
nvim-cmp - Auto completion plugin
LuaSnip - Snippet Engine for Neovim written in Lua
nvim-tree.lua - A File Explorer written In Lua
indentBlankline - Adds indentation guides to all lines (including empty lines)
nvim-autopairs - A super powerful autopairs for Neovim
Tagbar - A class outline viewer for Vim
gitsigns - Super fast git decorations implemented purely in lua/teal
nvim-treesitter - Nvim Treesitter configurations and abstraction layer
alpha-nvim - A fast and highly customizable greeter for neovim.
nvim-web-devicons - A Lua fork of vim-devicons
${HOME}/.config/nvim
├── lua
│ ├── core
│ │ ├── autocmds.lua
│ │ ├── colors.lua
│ │ ├── keymaps.lua
│ │ ├── options.lua
│ │ └── statusline.lua
│ ├── plugins
│ │ ├── alpha-nvim.lua
│ │ ├── indent-blankline.lua
│ │ ├── nvim-cmp.lua
│ │ ├── nvim-lspconfig.lua
│ │ ├── nvim-tree.lua
│ │ └── nvim-treesitter.lua
│ └── packer_init.lua
├── plugin
│ └── packer_compiled.lua
└── init.lua
/nvim
init.lua: Main configuration file that call lua
modules
lua: Folder of lua
modules, here reside all the Lua modules that needed. These modules are called from init.lua
file (see below).
See: https://github.com/nanotee/nvim-lua-guide#where-to-put-lua-files
/nvim/lua
/nvim/lua/core
autocmds.lua: Define autocommands with Lua APIs
colors.lua: Define Neovim and plugins color scheme
keymaps.lua: Keymaps configuration file, vim/neovim and plugins keymaps
options.lua: General Neovim settings
statusline.lua: Statusline configuration file
/nvim/lua/plugins
packer.lua: Plugin manager settings
alpha-nvim.lua: Dashboard
indent-blankline.lua: Indent line
nvim-cmp.lua: Autocompletion settings
nvim-lspconfig.lua: LSP configuration (language servers, keybinding)
nvim-tree.lua: File manager settings
nvim-treesitter: Treesitter interface configuration
Install Neovim v0.7.x.
Install Nerd Fonts, (for the font of the screenshots install Cozette Font).
Install npm for download packages of LSP language servers, see: LSP Configuration.
Make a backup of your current nvim
folder if necessary:
mv ~/.config/nvim ~/.config/nvim.backup
git
and copy the nvim
folder in the ${HOME}/.config
directory:git clone https://github.com/brainfucksec/neovim-lua.git
cd neovim-lua/
cp -Rv nvim ~/.config/
git clone --depth 1 https://github.com/wbthomason/packer.nvim\
~/.local/share/nvim/site/pack/packer/start/packer.nvim
PackerSync
command:nvim +PackerSync
npm
sudo npm install -g bash-language-server pyright vscode-langservers-extracted typescript typescript-language-server
C, C++:
Python:
Lua - builtin
Bash - bashls
Python - pyright
C, C++ - clangd
HTML, CSS, JSON - vscode-html
JavaScript, TypeScript - tsserver
See: nvim-lspconfig #doc/server_configurations.md
Fonts: Cozette
Icons: nvim-web-devicons
The color scheme is defined in the following files (default: OneDark):
-- Load nvim color scheme:
...color_scheme = pcall(require, 'onedark')
require('onedark').setup {
style = 'darker'
}
require('onedark').load()
-- Set colorscheme (from core/colors.lua/colorscheme_name)
local colors = require('core/colors').onedark_dark
checkhealth
, you should not see any error in the output (except for the one related to the Python 2 interpreter if don’t have it)::checkhealth
startuptime
option to read the nvim startup logs:nvim --startuptime > /tmp/nvim-start.log
nvim /tmp/nvim-start.log
See: :help startuptime
https://neovim.io/doc/user/lua.html
https://github.com/nanotee/nvim-lua-guide
https://dev.to/vonheikemen/everything-you-need-to-know-to-configure-neovim-using-lua-3h58
https://www.old.reddit.com/r/neovim/
https://github.com/LunarVim/Neovim-from-scratch
https://github.com/siduck76/NvChad
https://github.com/artart222/CodeArt
https://github.com/crivotz/nv-ide
Lua in Y minutes - https://learnxinyminutes.com/docs/lua/
Lua Quick Guide - https://github.com/medwatt/Notes/blob/main/Lua/Lua_Quick_Guide.ipynb
Lua 5.4 Reference Manual - https://www.lua.org/manual/5.4/
As all my setups I try to follow the KISS principle, probably some concepts may not be valid for everyone. Then feel free to take what you need but don’t install anything without checking first!
Thanks to all the authors of the sources mentioned above, to all the others from whom I “stole” some configs and thanks to the users of /r/Neovim subreddit for the support of the configuration :)