Neovim — init.lua

8 min readFeb 7, 2021
Neovim + Lua = init.lua


Integration of Lua as a first-class language in the latest release of Neovim provides a good alternative to developers to use a more proper programming language to configure Neovim and develop plugins. Vimscript can get a bit messy to manage when the code base grows. Lua is also relatively easy to learn compared to Emacs Lisp which is used to configure Emacs.

I have been trying to configure Neovim using Lua. There are many developers who had done this, and it seems each one has very different ways of coding the configurations. This is a bit challenging for a beginner to understand.

In this article, I am going to set up a very simple solution that hopefully is easier for beginners to understand, and they can further engineer or customize the solution based on their preferences.

Check out our Neovim for Beginners series for more articles!

What to Achieve

  • Automate the installation and setup of a package manager - packer.nvim
  • Use packer.nvim to install a color scheme, fuzzy finder, and Lua language server
  • Set up sensible defaults and key mappings using Lua
  • Configure Lua language server so that I can use Neovim to learn Lua




Software engineer, Data Science and ML practitioner.