on master help sign in
Merge pull request #517 from raichoo/vim

remove vim files from contrib in favor of idris-hackers repo

commit2bdb46b98a49acca80142ae5a05d0068c5932afc authorEdwin Brady <edwin.brady@gmail.com> dateSat 5 Oct 2013, 09:07 (13 years ago) parent1a535c0a8c142e
6 files changed−260
contribs/tool-support/vim/README−8 contribs/tool-support/vim/ftdetect/idris.vim−1 contribs/tool-support/vim/ftplugin/idris.vim−3 contribs/tool-support/vim/indent/idris.vim−139 contribs/tool-support/vim/syntax/idris.vim−63 contribs/tool-support/vim/syntax_checkers/idris/idris.vim−46
contribs/tool-support/vim/READMEdeleted−8
@@ -1,8 +0,0 @@
1−Copy content into your ~/.vim directory.
2−
3−Be sure that the following lines are in your
4−.vimrc
5−
6−syntax on
7−filetype on
8−filetype plugin indent on
contribs/tool-support/vim/ftdetect/idris.vimdeleted−1
@@ -1 +0,0 @@
1−au BufNewFile,BufRead *.idr setf idris
contribs/tool-support/vim/ftplugin/idris.vimdeleted−3
@@ -1,3 +0,0 @@
1−setlocal shiftwidth=2
2−setlocal tabstop=2
3−setlocal expandtab
contribs/tool-support/vim/indent/idris.vimdeleted−139
@@ -1,139 +0,0 @@
1−" indentation for idris (idris-lang.org)
2−"
3−" Based on haskell indentation by motemen <motemen@gmail.com>
4−"
5−" author: raichoo (raichoo@googlemail.com)
6−" date: Mar 19 2013
7−"
8−" Modify g:idris_indent_if and g:idris_indent_case to
9−" change indentation for `if'(default 3) and `case'(default 5).
10−" Example (in .vimrc):
11−" > let g:idris_indent_if = 2
12−
13−if exists('b:did_indent')
14− finish
15−endif
16−
17−let b:did_indent = 1
18−
19−if !exists('g:idris_indent_if')
20− " if bool
21− " >>>then ...
22− " >>>else ...
23− let g:idris_indent_if = 3
24−endif
25−
26−if !exists('g:idris_indent_case')
27− " case xs of
28− " >>>>>[] -> ...
29− " >>>>>(y::ys) -> ...
30− let g:idris_indent_case = 5
31−endif
32−
33−if !exists('g:idris_indent_let')
34− " let x : Nat = O in
35− " >>>>x
36− let g:idris_indent_let = 4
37−endif
38−
39−if !exists('g:idris_indent_rewrite')
40− " rewrite prf in expr
41− " >>>>x
42− let g:idris_indent_rewrite = 8
43−endif
44−
45−if !exists('g:idris_indent_where')
46− " where f : Nat -> Nat
47− " >>>>>>f x = x
48− let g:idris_indent_where = 6
49−endif
50−
51−if !exists('g:idris_indent_do')
52− " do x <- a
53− " >>>y <- b
54− let g:idris_indent_do = 3
55−endif
56−
57−setlocal indentexpr=GetIdrisIndent()
58−setlocal indentkeys=!^F,o,O,}
59−
60−function! GetIdrisIndent()
61− let prevline = getline(v:lnum - 1)
62−
63− if prevline =~ '[!#$%&*+./<>?@\\^|~-]\s*$'
64− let s = match(prevline, '[:=]')
65− if s > 0
66− return s + 2
67− else
68− return match(prevline, '\S')
69− endif
70− endif
71−
72− if prevline =~ '[{([][^})\]]\+$'
73− return match(prevline, '[{([]')
74− endif
75−
76− if prevline =~ '\<let\>\s\+.\+\<in\>\s*$'
77− return match(prevline, 'let') + g:idris_indent_let
78− endif
79−
80− if prevline =~ '\<rewrite\>\s\+.\+\<in\>\s*$'
81− return match(prevline, 'rewrite') + g:idris_indent_rewrite
82− endif
83−
84− if prevline !~ '\<else\>'
85− let s = match(prevline, '\<if\>.*\&.*\zs\<then\>')
86− if s > 0
87− return s
88− endif
89−
90− let s = match(prevline, '\<if\>')
91− if s > 0
92− return s + g:idris_indent_if
93− endif
94− endif
95−
96− if prevline =~ '\(\<where\>\|\<do\>\|=\|[{([]\)\s*$'
97− return match(prevline, '\S') + &shiftwidth
98− endif
99−
100− if prevline =~ '\<where\>\s\+\S\+.*$'
101− return match(prevline, '\<where\>') + g:idris_indent_where
102− endif
103−
104− if prevline =~ '\<do\>\s\+\S\+.*$'
105− return match(prevline, '\<do\>') + g:idris_indent_do
106− endif
107−
108− if prevline =~ '^\s*\<\(co\)\?data\>\s\+[^=]\+\s\+=\s\+\S\+.*$'
109− return match(prevline, '=')
110− endif
111−
112− if prevline =~ '\<with\>\s\+([^)]*)\s*$'
113− return match(prevline, '\S') + &shiftwidth
114− endif
115−
116− if prevline =~ '\<case\>\s\+.\+\<of\>\s*$'
117− return match(prevline, 'case') + g:idris_indent_case
118− endif
119−
120− if prevline =~ '^\s*\(\<namespace\>\|\<\(co\)\?data\>\)\s\+\S\+\s*$'
121− return match(prevline, '\(\<namespace\>\|\<\(co\)\?data\>\)') + &shiftwidth
122− endif
123−
124− if prevline =~ '^\s*\(\<using\>\|\<parameters\>\)\s*([^(]*)\s*$'
125− return match(prevline, '\(\<using\>\|\<parameters\>\)') + &shiftwidth
126− endif
127−
128− if prevline =~ '^\s*\<mutual\>\s*$'
129− return match(prevline, '\<mutual\>') + &shiftwidth
130− endif
131−
132− let line = getline(v:lnum)
133−
134− if (line =~ '^\s*}\s*' && prevline !~ '^\s*;')
135− return match(prevline, '\S') - &shiftwidth
136− endif
137−
138− return match(prevline, '\S')
139−endfunction
contribs/tool-support/vim/syntax/idris.vimdeleted−63
@@ -1,63 +0,0 @@
1−" syntax highlighting for idris (idris-lang.org)
2−"
3−" Heavily modified version of the haskell syntax
4−" highlighter to support idris.
5−"
6−" author: raichoo (raichoo@googlemail.com)
7−" date: Aug 10 2013
8−
9−syn match idrisModule "\<\(module\|namespace\)\>"
10−syn match idrisImport "\<import\>"
11−syn match idrisRefl "\<refl\>"
12−syn match idrisStructure "\<\(class\|\(co\)\?data\|instance\|where\|record\|dsl\)\>"
13−syn match idrisVisibility "\<\(public\|abstract\|private\)\>"
14−syn match idrisBlock "\<\(parameters\|mutual\|postulate\|using\)\>"
15−syn match idrisAnnotation "\<\(total\|partial\|auto\|impossible\|static\|implicit\)\>"
16−syn match idrisStatement "\<\(do\|case\|of\|rewrite\|let\|in\|with\)\>"
17−syn match idrisSyntax "\(pattern \+\|term \+\)\?syntax"
18−syn match idrisConditional "\<\(if\|then\|else\)\>"
19−syn match idrisTactic contained "\<\(intros\?\|rewrite\|exact\|refine\|trivial\|let\|focus\|try\|compute\|solve\|attack\|reflect\|fill\|applyTactic\)\>"
20−syn match idrisNumber "\<[0-9]\+\>\|\<0[xX][0-9a-fA-F]\+\>\|\<0[oO][0-7]\+\>"
21−syn match idrisFloat "\<[0-9]\+\.[0-9]\+\([eE][-+]\=[0-9]\+\)\=\>"
22−syn match idrisDelimiter "(\|)\|\[\|\]\|,\|;\|_\|{\|}"
23−syn match idrisInfix "\<\(prefix\|infix\|infixl\|infixr\)\>"
24−syn match idrisOperators "\([-!#$%&\*\+./<=>\?@\\^|~:]\|\<_\>\)"
25−syn match idrisType "\<\([A-Z][a-zA-Z0-9_]*\|_|_\)\>"
26−syn match idrisLineComment "---*\([^-!#$%&\*\+./<=>\?@\\^|~].*\)\?$"
27−syn match idrisMetaVar "?[a-z][A-Za-z0-9_]\+'*"
28−syn match idrisLink "%\(lib\|link\|include\)"
29−syn match idrisDirective "%\(access\|default\|assert_total\)"
30−syn match idrisDSL "\(lambda\|variable\|\index_first\|index_next\)"
31−syn match idrisChar "'[^'\\]'\|'\\.'\|'\\u[0-9a-fA-F]\{4}'"
32−syn match idrisBacktick "`[A-Za-z][A-Za-z0-9_]*`"
33−syn region idrisString start=+"+ skip=+\\\\\|\\"+ end=+"+
34−syn region idrisBlockComment start="{-" end="-}" contains=idrisBlockComment
35−syn region idrisProofBlock start="\(default\s\+\)\?\(proof\|tactics\) *{" end="}" contains=idrisTactic
36−
37−highlight def link idrisImport Structure
38−highlight def link idrisModule Structure
39−highlight def link idrisStructure Structure
40−highlight def link idrisStatement Statement
41−highlight def link idrisDSL Statement
42−highlight def link idrisBlock Statement
43−highlight def link idrisAnnotation Statement
44−highlight def link idrisSyntax Statement
45−highlight def link idrisVisibility Statement
46−highlight def link idrisConditional Conditional
47−highlight def link idrisProofBlock Macro
48−highlight def link idrisRefl Macro
49−highlight def link idrisTactic Identifier
50−highlight def link idrisLink Statement
51−highlight def link idrisDirective Statement
52−highlight def link idrisNumber Number
53−highlight def link idrisFloat Float
54−highlight def link idrisDelimiter Delimiter
55−highlight def link idrisInfix PreProc
56−highlight def link idrisOperators Operator
57−highlight def link idrisType Include
58−highlight def link idrisLineComment Comment
59−highlight def link idrisBlockComment Comment
60−highlight def link idrisMetaVar Identifier
61−highlight def link idrisString String
62−highlight def link idrisChar String
63−highlight def link idrisBacktick Operator
contribs/tool-support/vim/syntax_checkers/idris/idris.vimdeleted−46
@@ -1,46 +0,0 @@
1−"============================================================================
2−"File: idris.vim
3−"Description: Syntax checking plugin for syntastic.vim
4−"Maintainer: raichoo <raichoo at googlemail dot com>
5−"License: This program is free software. It comes without any warranty,
6−" to the extent permitted by applicable law. You can redistribute
7−" it and/or modify it under the terms of the Do What The Fuck You
8−" Want To Public License, Version 2, as published by Sam Hocevar.
9−" See http://sam.zoy.org/wtfpl/COPYING for more details.
10−"
11−"============================================================================
12−
13−if exists("g:loaded_syntastic_idris_idris_checker")
14− finish
15−endif
16−let g:loaded_syntastic_idris_idris_checker=1
17−
18−function! SyntaxCheckers_idris_idris_IsAvailable()
19− return executable("idris")
20−endfunction
21−
22−if !exists("g:syntastic_idris_options")
23− let g:syntastic_idris_options = " "
24−endif
25−
26−
27−function! SyntaxCheckers_idris_idris_GetLocList()
28− let makeprg = syntastic#makeprg#build({
29− \ 'exe': 'idris',
30− \ 'args': '--check '. g:syntastic_idris_options,
31− \ 'filetype': 'idris',
32− \ 'subchecker': 'idris' })
33−
34− let errorformat =
35− \ '"%f" (line %l\, column %c\):,' .
36− \ '%f\:%l\:%m,' .
37− \ 'user error (%f\:%l\:%m\)'
38−
39− return SyntasticMake({
40− \ 'makeprg': makeprg,
41− \ 'errorformat': errorformat })
42−endfunction
43−
44−call g:SyntasticRegistry.CreateAndRegisterChecker({
45− \ 'filetype': 'idris',
46− \ 'name': 'idris'})