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

Different bullet icons at different level? #1

Closed
lkhphuc opened this issue Mar 22, 2024 · 1 comment · Fixed by #11
Closed

Different bullet icons at different level? #1

lkhphuc opened this issue Mar 22, 2024 · 1 comment · Fixed by #11
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@lkhphuc
Copy link
Contributor

lkhphuc commented Mar 22, 2024

Thanks for the plugin.
Can you make different bullet icons at different level similar to headlines.nvim as well?

@MeanderingProgrammer
Copy link
Owner

Thanks for taking a look at the plugin, and I appreciate the feedback!
I understand the want for a feature like this, however I'm not going to be adding it, some reasons below.

1) Complexity

It gets strangely complicated since we can't pull this level information out of tree-sitter. I tried to do something like this early on, but didn't like any solution I was able to come up with.

I'm open to someone else doing this work if there's a nice way to do it that I wasn't able to find. However I imagine it would get very heuristic heavy, counting the number of spaces on the line or something like that, which would not be very reliable. In general unless the grammar can tell us this information reliably I'd rather leave it out.

2) Not part of headlines.nvim

This is more of a clarification than a reason, but headlines.nvim does not have different bullet icons at different levels for lists. It doesn't support lists in general.

Even though there is a parameter called bullets, it is only used for the headings, it is in fact equivalent to the headings parameter in this plugin and the confusion is why I renamed it here.

There is a feature request in headlines.nvim to add support for lists in general: lukas-reineke/headlines.nvim#46, which if someone wants to port this implementation over they are more than welcome to. I think the implementation here would fit in very nicely there.

@MeanderingProgrammer MeanderingProgrammer added wontfix This will not be worked on enhancement New feature or request help wanted Extra attention is needed and removed wontfix This will not be worked on labels Mar 22, 2024
redimp added a commit to redimp/markdown.nvim that referenced this issue Mar 31, 2024
- To calculate the level of the list_item the number of parent nodes
  with type "list" is counted.
- Replaced config option bullet string with bullets string[]

Closes MeanderingProgrammer#1
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants