This setup is for neovim >= v0.5.0
paq-nvim - Neovim package manager written in Lua
indentLine - Show indent lines
lualine.nvim - Statusline written in pure Lua
nvim-cmp - Auto completion plugin
nvim-lspconfig - A collection of common configurations for Neovim's built-in language server client.
nvim-tree.lua - A File Explorer written In Lua
nvim-web-devicons - A Lua fork of vim-devicons
vista.vim - View and search LSP symbols, tags in Vim/NeoVim
~/.config/nvim
.
├── init.lua
└── lua
├── keymapping.lua
├── plugins
│ ├── lualine.lua
│ ├── nvim-cmp.lua
│ ├── nvim-lspconfig.lua
│ ├── nvim-tree.lua
│ ├── paq-nvim.lua
│ └── vista.lua
└── settings.lua
-
init.lua: Main configuration file (call
luamodules, load plugins etc.) -
lua: Folder of
luamodules, here reside all the Lua modules that needed. The logic is simple, inside theluafolder there are the files and/or folders for neovim and plugins settings (written in Lua), these modules are called frominit.luafile (See below). For plugins settings I use the convention<plugin-folder/main.lua>. See: https://github.com/nanotee/nvim-lua-guide#where-to-put-lua-files -
keymapping.lua: Keymaps configuration file, vim/neovim and plugins keymaps.
-
settings.lua: General Neovim settings and configuration
-
plugins/lualine.lua: Statusline configuration file (in this case I use this file for lualine.nvim configuration)
-
plugins/nvim-cmp.lua: Autocompletion settings, TAB completion also for LSP
-
plugins/nvim-lspconfig.lua: LSP configuration: in this file I insert the language servers for LSP
-
plugins/nvim-tree.lua: File manager settings
-
plugins/paq-nvim.lua: Plugin manager settings
-
plugins/vista.lua: Tag viewer settings
Bash
C
Python
Colorscheme: molokai
Fonts: Cozette
Icons: nvim-web-devicons
-
Install neovim >= v0.5.0
-
Install npm (for download the packages of LSP language servers)
-
Download this repository with
gitand copy thenvimfolder
git clone https://github.com/brainfucksec/neovim-lua.git
cd neovim-lua/
cp -Rv nvim ~/.config/nvim/-
Install Paq
-
Open
neovimand run the command :PaqInstall to install the plugins
- Install LSP language servers with
npm
sudo npm install -g bash-language-server pyright vscode-langservers-extracted-
Open a file with
neovimand run command :LspInfo for testing the LSP support
Supported languages in my configuration:
Bash - bashls
Python - pyright
C, C++ - clangd
HTML, CSS, JavaScript - vscode-html
See: nvim-lspconfig #CONFIG.md
-
Add Go,Lua (and other languages) to LSP configuration
-
Continue the migration from VimL (Vimscript) to Lua :)
-
Add a start page when Neovim is opened without arguments
-
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.1 Reference Manual - https://www.lua.org/manual/5.1/
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!




