feat: refactor init.vim to use lua

This commit is contained in:
2021-08-10 21:50:49 +02:00
parent c5096afe64
commit 1e65796eb8
7 changed files with 252 additions and 127 deletions

13
configs/lua/utils.lua Normal file
View File

@ -0,0 +1,13 @@
local M = {}
local cmd = vim.cmd
function M.create_augroup(autocmds, name)
cmd('augroup ' .. name)
cmd('autocmd!')
for _, autocmd in ipairs(autocmds) do
cmd('autocmd ' .. table.concat(autocmd, ' '))
end
cmd('augroup END')
end
return M