@@ -49,7 +49,7 @@ if !exists('g:idris_indent_do')
51setlocal indentexpr=GetIdrisIndent()
51setlocal indentexpr=GetIdrisIndent()
52−setlocal indentkeys=!^F,o,O
52+setlocal indentkeys=!^F,o,O,}
54function! GetIdrisIndent()
54function! GetIdrisIndent()
55 let prevline = getline(v:lnum - 1)
55 let prevline = getline(v:lnum - 1)
@@ -63,7 +63,7 @@ function! GetIdrisIndent()
66− if prevline =~ '[{([]\s*$'
66+ if prevline =~ '[{([][^})\]]\+$'
67 return match(prevline, '[{([]')
67 return match(prevline, '[{([]')
@@ -83,7 +83,7 @@ function! GetIdrisIndent()
86− if prevline =~ '\(where\|do\|=\)\s*$'
86+ if prevline =~ '\(where\|do\|=\|[{([]\)\s*$'
87 return match(prevline, '\S') + &shiftwidth
87 return match(prevline, '\S') + &shiftwidth
@@ -119,5 +119,11 @@ function! GetIdrisIndent()
119 return match(prevline, 'mutual') + &shiftwidth
119 return match(prevline, 'mutual') + &shiftwidth
122+ let line = getline(v:lnum)
124+ if (line =~ '^\s*}\s*' && prevline !~ '^\s*;')
125+ return match(prevline, '\S') - &shiftwidth
122 return match(prevline, '\S')
128 return match(prevline, '\S')
123endfunction
129endfunction