Make bullet list item styles configurable #113
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit introduces a new option
g:bullets_list_item_styles
to specify a list of regexes that match valid bullet point characters to be recognized by bullets.vim.The default is the same as the currently hardcoded list.
This commit only introduces this configurability for bullet list items as this may be the most useful bullet item type to have configurability.
It may be considered to provide this configurability for the other bullet item types, too (like checkbox list items, probably not the number styles).
This change should probably fix #88 (but I am not sure as I don't really understand that issue)
and also render #98 and #106 obsolete, as such less common bullet items could easily be added by the user.
It would also offer the possibilty to query the list of bullet styles from other plugins (for example to provide syntax highlighting for them).
There is, however, one drawback (a drawback that is not introduced with this PR, but already exist in the current codebase). The list of valid bullet styles is totally separate from the list of bullet styles to be used for different indentation levels. This is not only surprising (as you can see in #112), but can also be error-prone (as it allows characters in
g:bullets_outline_levels
that are not valid bullet styles at all).I think that can only be fixed by merging
g:bullets_list_item_styles
andg:bullets_outline_levels
together into a single setting. That setting would probably be more complex and would maybe be a multi-dimensional list. But I have not put any thought into it. Just wanted to mention this problem that could be worth getting addressed.