/neovim-lua

Neovim Lua

Primary LanguageVim ScriptGNU General Public License v3.0GPL-3.0

Neovim Lua

My Neovim configuration with Lua (migration from VimL to Lua)

.

This setup is for neovim >= v0.5.0

Plugins

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

Directory tree of Lua files

~/.config/nvim
.
├── init.lua
└── lua
    ├── keymaps.lua
    ├── plugins
    │   ├── lualine.lua
    │   ├── nvim-cmp.lua
    │   ├── nvim-lspconfig.lua
    │   ├── nvim-tree.lua
    │   ├── paq-nvim.lua
    │   └── vista.lua
    └── settings.lua

Files and settings

Screenshots

Bash

.

C

.

Python

.

Appearance

Colorscheme: molokai

Fonts: Cozette

Icons: nvim-web-devicons

Startup time

.

Installation

  1. Install neovim >= v0.5.0

  2. Install npm (for download the packages of LSP language servers)

  3. Download this repository with git and copy the nvim folder

    git clone https://github.com/brainfucksec/neovim-lua.git
    cd neovim-lua/
    cp -Rv nvim ~/.config/nvim/
  1. Install Paq

  2. Open neovim and run the command :PaqInstall to install the plugins

LSP Configuration

  1. Install LSP language servers with npm
    sudo npm install -g bash-language-server pyright vscode-langservers-extracted
  1. Install clang for use LSP with clangd

  2. Open a file with neovim and 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

TODO

  • Add Go,Lua (and other languages) to LSP configuration

  • Improve LSP configuration

  • Continue the migration from VimL (Vimscript) to Lua :)

  • Add a start page when Neovim is opened without arguments


Guides and resources

Lua resources

Disclaimer

  • This configuration is in development version. See: Version on init.lua file.

  • The configuration is being migrated from VimL (Vim Script) to Lua, for now many .vim files are still used.

  • 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 and to all the others from whom I "stole" some configs :)