neovim init.lua

early look at lua in neovim

SEAN K.H. LIAO

neovim init.lua

early look at lua in neovim

neovim

neovim has partial support for lua, specifically LuaJIT. This looks like a possibly great way to replace vimscript, because why not?

tested with NVIM v0.5.0-678-ga621c45ba

example: init.lua, permalink

init.lua

Proposed but not yet implemented.

options

All your set XXX, set XYZ=abc can be represented as vim.o.XXX, vim.wo.YYY, vim.bo.ZZZ. vim.o.* won't error with unknown options but also (currently) won't work with all options.

plugins

Why not use the new built in support for loading vim packages? this uses minpac.

The differences in calling method appear to be because they are builtin vs functions.

1vim.cmd('packadd minpac')
2vim.fn['minpac#add']('k-takata/minpac', {type = 'opt'})

augroups and functions

augroups live in nvim_exec and functions in nvim_command. Not quite sure why they need to be different.

keymaps

nvim_set_keymap works, but not sure what cnoreabbrev turns into.