Example (from vim-endwise):
autocmd FileType lua let b:endwise = {
\ 'addition': 'end',
\ 'words': 'function,do,then',
\ 'pattern': '^\s*\zs\%(\%(local\s\+\)\=function\)\>\%(.*\<end\>\)\@!\|\<\%(then\|do\)\ze\s*$',
\ 'syngroups': 'luaFunction,luaStatement,luaCond'}
This gets formatted as:
autocmd FileType lua
\ let b:endwise = { |
\ \ 'addition': 'end', |
\ \ 'words': 'function,do,then', |
\ \ 'pattern': |
\ \ '^\s*\zs\%(\%(local\s\+\)\=function\)\>\%(.*\<end\>\)\@!\|\<\%(then\|do\)\ze\s*$', |
\ \ 'syngroups': 'luaFunction,luaStatement,luaCond', |
\ \ }
Haven't narrowed this down yet but probably it's because formatting an autocommand in f_node() is pretty janky and assumes all the lines of the body are individual expressions. Likely need to add a f_autocmd() method to handle this.