We need to write full custom indent specification, as smartindent is not great really.
Those rules would include stuff like:
- tab after new scope + newline
// after comment + newline (?) (rust has that)
- tab after a match case (see here)
- same with labels
- fixing this:

Also -1 tab after e.g.:
- ending a scope
| in a match case
- after a
break and other scope-ending keywords
Setting up code folding would also be cool.
That's all off the top of my head but I'm sure there is more to do.
More resources that could help:
https://vimdoc.sourceforge.net/htmldoc/indent.html
https://stackoverflow.com/questions/11747840/creating-custom-vim-syntax-can-i-set-custom-auto-indent-rules
We need to write full custom indent specification, as
smartindentis not great really.Those rules would include stuff like:
//after comment + newline (?) (rust has that)Also -1 tab after e.g.:
|in a match casebreakand other scope-ending keywordsSetting up code folding would also be cool.
That's all off the top of my head but I'm sure there is more to do.
More resources that could help:
https://vimdoc.sourceforge.net/htmldoc/indent.html
https://stackoverflow.com/questions/11747840/creating-custom-vim-syntax-can-i-set-custom-auto-indent-rules