Nvim plug: nvim-ufo

From wikinotes
Revision as of 01:52, 22 February 2024 by Will (talk | contribs) (Created page with "A plugin for neovim that allows syntaxhighlighting within folds. {{ NOTE | this does not appear to respect my custom fold treesitter-queries }} = Documentation = <blockquote> {| class="wikitable" |- | github || https://github.com/kevinhwang91/nvim-ufo |- |} </blockquote><!-- Documentation --> = Troubleshooting = <blockquote> == Code keeps folding on save or exiting insert mode == <blockquote> '''TL;DR''' return <code>''</code> for that language's provider-selector. Se...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A plugin for neovim that allows syntaxhighlighting within folds.

NOTE:

this does not appear to respect my custom fold treesitter-queries

Documentation

github https://github.com/kevinhwang91/nvim-ufo

Troubleshooting

Code keeps folding on save or exiting insert mode

TL;DR return for that language's provider-selector. See https://github.com/kevinhwang91/nvim-ufo/issues/30

local ftMap = {
    python = ''
}
require('ufo').setup({
    provider_selector = function(bufnr, filetype)
        return ftMap[filetype]
    end
})