Nvim plug: nvim-ufo: Difference between revisions

From wikinotes
(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...")
 
 
(One intermediate revision by the same user not shown)
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="vim">
<syntaxhighlight lang="lua">
-- return '' for python
local ftMap = {
local ftMap = {
     python = ''
     python = ''

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
})