razak17 / tailwind-fold.nvim

Neovim plugin to conceal long class attributes.
48 stars 7 forks source link

Breaks commentstring for Vue SFC #6

Open catgoose opened 2 months ago

catgoose commented 2 months ago

My comment config:

return {
    "numToStr/Comment.nvim",
    config = function()
        local prehook = require("ts_context_commentstring.integrations.comment_nvim").create_pre_hook()
        require("Comment").setup({
            padding = true,
            sticky = true,
            ignore = "^$",
            toggler = {
                line = "gcc",
                block = "gbc",
            },
            opleader = {
                line = "gc",
                block = "gb",
            },
            extra = {
                above = "gcO",
                below = "gco",
                eol = "gcA",
            },
            mappings = {
                basic = true,
                extra = true,
                extended = false,
            },
            pre_hook = prehook,
            post_hook = nil,
        })
    end,
    event = "BufReadPre",
    lazy = false,
    dependencies = {
        "nvim-treesitter/nvim-treesitter",
        "JoosepAlviste/nvim-ts-context-commentstring",
    },
}

tailwind-fold causes treesitter to set commentstring to html for the style and script portions of Vue SFC as well as template (where this behavior is normal)

razak17 commented 2 months ago

Try out the nightly branch and see if it fixes you issue.