vim/ftplugin/nextflow/folding.vim @ 05ef9c8cbeeb

More
author Steve Losh <steve@stevelosh.com>
date Fri, 03 Nov 2023 10:12:49 -0400
parents (none)
children (none)
setlocal foldmethod=expr
setlocal foldexpr=GetNextflowFold(v:lnum)

function! GetNextflowFold(lnum)
    let line = getline(a:lnum)

    if line =~ '^\S.*{$'
        return '>1'
    elseif line =~ '^}$'
        return '<1'
    elseif line =~ '^\S'
        return 0
    else
        return "="
    end
endfunction