autolist.nvim icon indicating copy to clipboard operation
autolist.nvim copied to clipboard

AutolistRecalculate removes bullets after markdown heading

Open hisbaan opened this issue 1 year ago • 0 comments

In a markdown file with no space between the previous text/start of file, the markdown heading, and the list below the heading, the bullets of the list are removed when running AutolistRecalculate

We start with a file:

# This is a test
- this is a test
- this is a test

Then running AutolistRecalculate we get

# This is a test
 this is a test
 this is a test
click here for config
return {
    "gaoDean/autolist.nvim",
    ft = {
        "markdown"
    },
    config = function()
        local list_patterns = {
            unordered = "[-+]", -- - +
            digit = "%d+[.)]", -- 1. 2. 3. ...
            ascii = "%a[.)]", -- a) b) c) ...
            roman = "%u*[.)]", -- I. II. III. ...
            latex_item = "\\item",
        }

        require("autolist").setup({
            enabled = true,
            lists = {
                markdown = {
                    list_patterns.unordered,
                    list_patterns.digit,
                    list_patterns.ascii,
                    list_patterns.roman,
                },
            },
        })
    end,
}

hisbaan avatar Jan 09 '24 19:01 hisbaan