Nvim plug: nvim-ufo: Difference between revisions

From wikinotes
 
Line 18: Line 18:
== Code keeps folding on save or exiting insert mode ==
== Code keeps folding on save or exiting insert mode ==
<blockquote>
<blockquote>
'''TL;DR''' return <code>''</code> for that language's provider-selector. See https://github.com/kevinhwang91/nvim-ufo/issues/30
'''TL;DR''' return '' for that language's provider-selector. See https://github.com/kevinhwang91/nvim-ufo/issues/30


<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">

Latest revision as of 02:00, 22 February 2024

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

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