Neovim Lua integration

Setting configuration with Lua

There are some equivalent setting values in Lua versus Vimscript. For more information, see the lua-vimscript help section.

DescriptionVimscript statementLua equivalent
Setting optionsset number relativenumbervim.opt.number, vim.opt.relativenumber = true, true
Setting local optionssetlocal spellvim.opt_local.spell = true
Running Vimscript commandscolorscheme nordvim.cmd "colorscheme nord"
Setting buffer-specific optionsb:ale-enabled=1vim.b["ale-enabled"] = 1

Some more general things you generally want to know:

Real-life examples making use of Neovim Lua API

This is a list of Neovim Lua modules that can serve as a basis for learning to interact Neovim with Lua.

Several people have already replaced their already existing Vim configurations with Neovim.