Skip to content

feature request: More options for checkmarks #42

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

Closed
admbeck opened this issue Jun 24, 2024 · 4 comments
Closed

feature request: More options for checkmarks #42

admbeck opened this issue Jun 24, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@admbeck
Copy link

admbeck commented Jun 24, 2024

Is your feature request related to a problem? Please describe.

I have been testing the plugin with my lists and encountered a minor annoyance in my workflow. I often use symbols other than "X" in my checkmarks to indicate various statuses such as progress, cancellation, rescheduling, etc.
image

Describe the solution you'd like

I was wondering if an option could be added to support a couple of other "custom" symbols for concealment.

checkbox = {
        unchecked = '󰄱 ',
        checked = '󰱒 ',
        -- custom checkbox
        custom1 = {
            original = "!" -- markdown: - [!]
            concealed = "󰀪"
        },
        custom2 = {
            original = "-" --markdown: - [-]
            concealed = "󰥔"
        },
        -- etc.
    },

Describe alternatives you've considered

I found similar functionality in Neorg, but their implementation is a bit wonky and only supports their own markup language.
image

Alternatively, is it possible to conceal "-" if checkmark box (- [ ]) is not empty instead of turning it into a bullet (•)?
image

Additional information

No response

@admbeck admbeck added the enhancement New feature or request label Jun 24, 2024
@admbeck admbeck changed the title feature: More options for checkmarks feature request: More options for checkmarks Jun 24, 2024
@MeanderingProgrammer
Copy link
Owner

This reminds me of callouts, in that it hijacks some standard markdown syntax to do something else. It even hijacks the same thing, a link, which is kind of interesting.

Is this supported by any other markdown system, i.e. github flavored markdown?

What's happening here is that the non empty block, i.e. [!] is recognized as a link, not a checkbox, and links are concealed by default. So when you have something like - [!] it is seen as a list item followed by a link, so the dash from the list item gets replaced by a bullet and the square brackets are hidden as part of link concealing.

While I can see the issue given your particular workflow, I think this falls outside of anything this plugin should support. I'll see if there's some way I can enable you to support this functionality.

@kuntau
Copy link

kuntau commented Jul 5, 2024

I'm second this request, but I only need [-] though... For now it's too ugly with PaperColor theme

Is this supported by any other markdown system, i.e. github flavored markdown?

Not for [-] but it's pretty well-known convention for todo checkbox

MeanderingProgrammer added a commit that referenced this issue Jul 6, 2024
# Details

Proposed in: #42

Take a similar approach as callouts and use shortcut_links in list items
as custom states of a checkbox.

Configurable through checkbox -> custom.

Each value must provide text, icon, and highlight.
@MeanderingProgrammer
Copy link
Owner

MeanderingProgrammer commented Jul 6, 2024

I've added support for this in: ff3e8e3

Had some minor naming changes in: 7065c7d

Please update and lmk how it works!

You can provide as many custom states as you like through checkbox -> custom.

I've added a default for the [-] state.

@admbeck
Copy link
Author

admbeck commented Jul 6, 2024

Please update and lmk how it works!

Tried it out on nvim v0.10.0. Default behavior works. Custom state works. Highlights work. Perfect implementation of what I only hoped could be. Thanks a lot!
image

@admbeck admbeck closed this as completed Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants