diff --git a/etc/soft/nvim/+ftplugin/cucumber.vim b/etc/soft/nvim/+ftplugin/cucumber.vim new file mode 100644 index 0000000..0db7504 --- /dev/null +++ b/etc/soft/nvim/+ftplugin/cucumber.vim @@ -0,0 +1,15 @@ + +" (c) greggroth/vim-cucumber-folding +function! CucumberFolds() + let thisline = getline(v:lnum) + + if match(thisline, '\(Scenario\( Outline\)\?\|Background\)\:') >= 0 + return ">1" + else + return "=" + endif +endfunction + +setlocal foldmethod=expr +setlocal foldexpr=CucumberFolds() +