From 61519413a9755974407eeb55467e425114889e12 Mon Sep 17 00:00:00 2001 From: Olivier Roques Date: Tue, 8 Mar 2022 17:13:07 +0100 Subject: [PATCH] feat: add comment --- lua/hardline.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lua/hardline.lua b/lua/hardline.lua index a65944d..e25f1cc 100644 --- a/lua/hardline.lua +++ b/lua/hardline.lua @@ -47,6 +47,15 @@ M.options = { } -------------------- SECTION MANAGEMENT -------------------- +-- Merge sections with same 'class' attribute and add spacing. For instance this: +-- {class = 'low', item = 'first'}, +-- {class = 'med', item = 'second'}, +-- {class = 'med', item = 'third'}, +-- {class = 'high', item = 'fourth'}, +-- will become this: +-- {class = 'low', item = ' first '}, +-- {class = 'med', item = ' first second '}, +-- {class = 'high', item = ' third '}, local function aggregate_sections(sections) local aggregated, piv = {}, 1 while piv <= #sections do