OXY2DEV/markview.nvim

4 Space tabs does not align properly showing both icon and bullet dash

Closed this issue · 6 comments

Describe the bug
Showing both the icon/symbol for bullet as well as the actual text/dash for the bullet.

Are you using a distro?
No

To Reproduce
Steps to reproduce the behavior:
Here is what I am using for the list items config:

        list_items = {
          enable = true,
          marker_minus = {
            add_padding = false,
            text = '',
          },
          marker_plus = { add_padding = false },
          marker_star = { add_padding = false },
          marker_dot = { add_padding = false },
        },

Here is the exact list item text to reproduce my screenshot:

- This is a new bullet
- And more bullets
    - And nested one
        - here its is
            - more stuff going
        - and more
    - and finally this too
    - and again
- and more

Expected behavior
Should not see the "dashes" from the list items when indented.

Actual behavior
There is duplication of the symbol/icon for the bullet and still showing the "-" dash list item.

Screenshots
This is what it looks like:

image

Here is what my actual content looks like with markview disabled (same as markdown pasted above):

image

Neovim version
0.10.0

It looks like it could be related to the add_padding = false as here is what it looks like if I turn the padding back on. But to me this is way to distracting and huge padding/margins that is not usable.

image

I noticed in the Wiki it mentions something about using 2 spaces instead of 4. The question is, does markview support 4 spaces or do we have to use 2 spaces? Here: https://github.com/OXY2DEV/markview.nvim/wiki/List%20items#-list-item-configuration

Probably related to #59

I noticed in the Wiki it mentions something about using 2 spaces instead of 4.

Because treesitter will consider everything after the 2 spaces to be a list marker. The only reason this works with add_padding = true is due to the plugin removing all the whitespaces before the marker.

This is what a marker using a tab for indentation looks like.
Screenshot_2024-08-10-07-23-34-033_com termux-edit

And this is what a normal marker looks like.
Screenshot_2024-08-10-07-24-08-140_com termux-edit

As you can see the marker starts from after 2 spaces(regardless of where +, -,* is present).


This is not a bug this is just how lists work.

@OXY2DEV so does that mean "officially" the plugin does not support 4 space indents? Given 4 space tabs is the default for markdown tools such as Obsidian, this may be a common "issue" users run into.

An alternative that could probably work is being able to set in config the padding size similar to how you can with adding padding to headings. The problem for me is they are way too wide with my 4 space indents so if I could decrease the padding it should be sufficient. Is that something you would consider adding?

Thanks!

Check the wiki page for the new option.

@OXY2DEV awesome! This is perfect. Thanks!