Skip to content

Conversation

@benlubas
Copy link
Contributor

@benlubas benlubas commented Aug 2, 2024

Allow the user to configure ordered list icons.

ex:

["core.concealer"] = {
  config = {
    ordered_icons = {
      ["1"] = function(i)
        if i < 10 then
          return "0" .. i
        end
        return tostring(i)
      end,
    },
  },
},

Yields:
image


This partially addresses a small issue where ordered lists that exceed 9 items in length, will not line up (b/c 10 is a char longer than 1). This allows people to pad single digits, but the padding will always be present.

Ideally the function above could take an index but also some context that includes the length of the list it's a part of. But this would require a more complex change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant