vim/ftplugin/nextflow/folding.vim @ 6c4c335faf47

Merge
author Steve Losh <steve@stevelosh.com>
date Tue, 06 Aug 2024 10:56:16 -0400
parents 05ef9c8cbeeb
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