blog

12020-09-11

SEAN K.H. LIAO

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.

vim.cmd('packadd minpac')
vim.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.