` vim.api.nvim_set_keymap('n', '<S-TAB>', ':bprevious<CR>', {noremap = true, silent = true})`
to
`nnoremap <silent> <S-TAB> :bprevious<CR>`
Why convert every single line of vimscript to a noisier lua statement?
The Packer manager seems a step back from vim-plug. Your configuration file is no longer the source of truth. Packer uses a global site directory for plugin as opposed to a local directory like vim-plug. Guess what? Neovim, paq also uses that directory. It's like the old days of plugins of installing everything globally. I had to do this after making a configuration change: :PackerSync, exit neovim, delete cache file, restart neovim, :PackerCompile. Believe me, forgetting a step has been an endless source of frustration.
function bindKey(mode, keys, command, options)
options = options or {noremap = true, silent = true}
return vim.api.nvim_set_keymap(mode, keys, command, options)
end
With that, remapping looks like this: bindKey('n', '<Tab>', ':bnext<CR>')
Which is in my opinion better than Vim syntax. I definitely see the potential in having Lua as scripting language.