lukas-reineke / headlines.nvim

This plugin adds horizontal highlights for text filetypes, like markdown, orgmode, and neorg.
MIT License
688 stars 28 forks source link

how to support vimwiki? #53

Closed hantaotaohan closed 1 year ago

hantaotaohan commented 1 year ago

how to support vimwiki?

lukas-reineke commented 1 year ago

headlines.nvim needs treesitter, and there is no treesitter grammar for vimwiki, sorry.

ThomasFeher commented 10 months ago

If you are using Vimwiki with Markdown syntax, you can do

require("headlines").setup {
    vimwiki = { -- this might be ['vimwiki.markdown'] depending on your vimwiki configuration
        treesitter_language = "markdown",
        -- copy configuration for markdown here
    },
}

And you should also consider to do https://github.com/vimwiki/vimwiki/issues/1367#issuecomment-1762420036.

Terseus commented 3 months ago

If someone stumble upon this, here's a solution without having to copy&paste the whole markdown config:

            local headlines = require("headlines")
            headlines.setup({
                vimwiki = vim.tbl_extend(
                    "force",
                    { treesitter_language = "markdown" },
                    headlines.config.markdown
                )
            })