on master help sign in
vim codata support
e49241draichoo
contribs/tool-support/vim/indent/idris.vim+3−3
@@ -95,7 +95,7 @@ function! GetIdrisIndent()
95 return match(prevline, 'do') + g:idris_indent_do
95 return match(prevline, 'do') + g:idris_indent_do
96 endif
96 endif
97
97
98− if prevline =~ '^\s*data\s\+[^=]\+\s\+=\s\+\S\+.*$'
98+ if prevline =~ '^\s*\(co\)\?data\s\+[^=]\+\s\+=\s\+\S\+.*$'
99 return match(prevline, '=')
99 return match(prevline, '=')
100 endif
100 endif
101
101
@@ -107,8 +107,8 @@ function! GetIdrisIndent()
107 return match(prevline, 'case') + g:idris_indent_case
107 return match(prevline, 'case') + g:idris_indent_case
108 endif
108 endif
109
109
110− if prevline =~ '^\s*\(namespace\|data\)\s\+\S\+\s*$'
110+ if prevline =~ '^\s*\(namespace\|\(co\)\?data\)\s\+\S\+\s*$'
111− return match(prevline, '\(namespace\|data\)') + &shiftwidth
111+ return match(prevline, '\(namespace\|\(co\)\?data\)') + &shiftwidth
112 endif
112 endif
113
113
114 if prevline =~ '^\s*using\s\+([^(]*)\s*$'
114 if prevline =~ '^\s*using\s\+([^(]*)\s*$'
contribs/tool-support/vim/syntax/idris.vim+2−2
@@ -8,7 +8,7 @@
8
8
9syn match idrisModule "\<\(module\|namespace\)\>"
9syn match idrisModule "\<\(module\|namespace\)\>"
10syn match idrisImport "\<import\>"
10syn match idrisImport "\<import\>"
11−syn match idrisStructure "\<\(class\|data\|instance\|where\|record\)\>"
11+syn match idrisStructure "\<\(class\|\(co\)\?data\|instance\|where\|record\)\>"
12syn match idrisVisibility "\<\(public\|abstract\|private\)\>"
12syn match idrisVisibility "\<\(public\|abstract\|private\)\>"
13syn match idrisStatement "\<\(do\|case\|of\|let\|in\|with\|total\|dsl\|auto\|using\)\>"
13syn match idrisStatement "\<\(do\|case\|of\|let\|in\|with\|total\|dsl\|auto\|using\)\>"
14syn match idrisSyntax "\(pattern \+\|term \+\)\?syntax"
14syn match idrisSyntax "\(pattern \+\|term \+\)\?syntax"
@@ -29,7 +29,7 @@ syn region idrisBlockComment start="{-" end="-}"
29syn region idrisProofBlock start="\(default\s\+\)\?proof *{" end="}" contains=idrisTactic
29syn region idrisProofBlock start="\(default\s\+\)\?proof *{" end="}" contains=idrisTactic
30
30
31highlight def link idrisImport Include
31highlight def link idrisImport Include
32−highlight def link idrisModule idrisStructure
32+highlight def link idrisModule Include
33highlight def link idrisStructure Structure
33highlight def link idrisStructure Structure
34highlight def link idrisStatement Statement
34highlight def link idrisStatement Statement
35highlight def link idrisSyntax Statement
35highlight def link idrisSyntax Statement