summaryrefslogtreecommitdiff
path: root/lua/lv-utils/init.lua
diff options
context:
space:
mode:
authorRafael <[email protected]>2021-07-04 22:14:01 -0300
committerRafael <[email protected]>2021-07-04 22:14:01 -0300
commit9f511bcb594b7e2461c97cb8182603928c773c2f (patch)
treec08a825ae91201fb0062dbd7a8094357f5c78dc9 /lua/lv-utils/init.lua
parentb461c878e6f70a6795d0e9b438335ccfecbb4bd9 (diff)
start formatting rules
Diffstat (limited to 'lua/lv-utils/init.lua')
-rw-r--r--lua/lv-utils/init.lua36
1 files changed, 17 insertions, 19 deletions
diff --git a/lua/lv-utils/init.lua b/lua/lv-utils/init.lua
index 016bba62..c836af97 100644
--- a/lua/lv-utils/init.lua
+++ b/lua/lv-utils/init.lua
@@ -1,27 +1,25 @@
local lv_utils = {}
function lv_utils.define_augroups(definitions) -- {{{1
- -- Create autocommand groups based on the passed definitions
- --
- -- The key will be the name of the group, and each definition
- -- within the group should have:
- -- 1. Trigger
- -- 2. Pattern
- -- 3. Text
- -- just like how they would normally be defined from Vim itself
- for group_name, definition in pairs(definitions) do
- vim.cmd('augroup ' .. group_name)
- vim.cmd('autocmd!')
+ -- Create autocommand groups based on the passed definitions
+ --
+ -- The key will be the name of the group, and each definition
+ -- within the group should have:
+ -- 1. Trigger
+ -- 2. Pattern
+ -- 3. Text
+ -- just like how they would normally be defined from Vim itself
+ for group_name, definition in pairs(definitions) do
+ vim.cmd("augroup " .. group_name)
+ vim.cmd "autocmd!"
- for _, def in pairs(definition) do
- local command = table.concat(vim.tbl_flatten {'autocmd', def}, ' ')
- vim.cmd(command)
- end
-
- vim.cmd('augroup END')
+ for _, def in pairs(definition) do
+ local command = table.concat(vim.tbl_flatten { "autocmd", def }, " ")
+ vim.cmd(command)
end
-end
+ vim.cmd "augroup END"
+ end
+end
return lv_utils
-