Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make bullet list item styles configurable #113

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hupfdule
Copy link

@hupfdule hupfdule commented Aug 10, 2021

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 and g: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.

hupfdule and others added 2 commits August 10, 2021 22:15
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, etc.).
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.

[Request] Support for bullet todo-lists
2 participants