Support for optional closing element in group
If b:matchwords has '\<if\>:\<elsif\>:\<else\>' it works when there is if/elsif/else or if/else. But I often use and encounter just if/elsif without a closing else, so matchit/matchup doesn't work on that syntax. Another example is '\<try\>:\<catch\>:\<finally\>'. It doesn't work when there is only try/catch. Is there any way to support this?
Is this request intended for python or some other languages?
perl
The main problem is match-up needs to know where to stop looking for more clauses. And unfortunately, perl is much too difficult to parse using regex.
It would be possible with treesitter, but there is not yet a perl parser for https://github.com/nvim-treesitter/nvim-treesitter.
So it might be a while before this can be supported, unless there is a simple way to determine where the end of the if/else block is.