on master help sign in
vim codata support
commite49241d5b5bbc088eff01a7509cf42e18a572bb5 authorraichoo <raichoo@googlemail.com> dateTue 23 Oct 2012, 20:21 (14 years ago) parentbf8685e
2 files changed+5−5
contribs/tool-support/vim/indent/idris.vim+3−3 contribs/tool-support/vim/syntax/idris.vim+2−2
contribs/tool-support/vim/indent/idris.vim+3−3
@@ -95,7 +95,7 @@ function! GetIdrisIndent()
9595 return match(prevline, 'do') + g:idris_indent_do
9696 endif
9797
98− if prevline =~ '^\s*data\s\+[^=]\+\s\+=\s\+\S\+.*$'
98+ if prevline =~ '^\s*\(co\)\?data\s\+[^=]\+\s\+=\s\+\S\+.*$'
9999 return match(prevline, '=')
100100 endif
101101
@@ -107,8 +107,8 @@ function! GetIdrisIndent()
107107 return match(prevline, 'case') + g:idris_indent_case
108108 endif
109109
110− if prevline =~ '^\s*\(namespace\|data\)\s\+\S\+\s*$'
111− return match(prevline, '\(namespace\|data\)') + &shiftwidth
110+ if prevline =~ '^\s*\(namespace\|\(co\)\?data\)\s\+\S\+\s*$'
111+ return match(prevline, '\(namespace\|\(co\)\?data\)') + &shiftwidth
112112 endif
113113
114114 if prevline =~ '^\s*using\s\+([^(]*)\s*$'
contribs/tool-support/vim/syntax/idris.vim+2−2
@@ -8,7 +8,7 @@
88
99syn match idrisModule "\<\(module\|namespace\)\>"
1010syn match idrisImport "\<import\>"
11−syn match idrisStructure "\<\(class\|data\|instance\|where\|record\)\>"
11+syn match idrisStructure "\<\(class\|\(co\)\?data\|instance\|where\|record\)\>"
1212syn match idrisVisibility "\<\(public\|abstract\|private\)\>"
1313syn match idrisStatement "\<\(do\|case\|of\|let\|in\|with\|total\|dsl\|auto\|using\)\>"
1414syn match idrisSyntax "\(pattern \+\|term \+\)\?syntax"
@@ -29,7 +29,7 @@ syn region idrisBlockComment start="{-" end="-}"
2929syn region idrisProofBlock start="\(default\s\+\)\?proof *{" end="}" contains=idrisTactic
3030
3131highlight def link idrisImport Include
32−highlight def link idrisModule idrisStructure
32+highlight def link idrisModule Include
3333highlight def link idrisStructure Structure
3434highlight def link idrisStatement Statement
3535highlight def link idrisSyntax Statement