diff --git a/README.md b/README.md index 8fee091..993fe9a 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,8 @@ use {"akinsho/org-bullets.nvim", config = function() require("org-bullets").setup { concealcursor = false, -- If false then when the cursor is on a line underlying characters are visible symbols = { + -- default: do not repeat the headlines list. use first icon only after all used once. + wrap = false, -- list symbol list = "•", -- headlines can be a list diff --git a/lua/org-bullets.lua b/lua/org-bullets.lua index 62f7bec..1e48484 100644 --- a/lua/org-bullets.lua +++ b/lua/org-bullets.lua @@ -21,6 +21,7 @@ local list_groups = { ---@field public indent? boolean local defaults = { symbols = { + wrap = false, list = "•", headlines = { "◉", "○", "✸", "✿" }, checkboxes = { @@ -73,7 +74,13 @@ local markers = { if not symbols then return false end - local symbol = add_symbol_padding((symbols[level] or symbols[1]), level, conf.indent) + local symbol + if not conf.symbols.wrap then + symbol = add_symbol_padding((symbols[level] or symbols[1]), level, conf.indent) + else + local symbolIndex = ((level - 1) % #symbols) + 1 + symbol = add_symbol_padding(symbols[symbolIndex], level, conf.indent) + end local highlight = org_headline_hl .. level return { { symbol, highlight } } end,