29996
|
1 " Vim indent file
|
|
2 " Language: Racket
|
|
3 " Maintainer: D. Ben Knoble <ben.knoble+github@gmail.com>
|
|
4 " Previous Maintainer: Will Langstroth <will@langstroth.com>
|
|
5 " URL: https://github.com/benknoble/vim-racket
|
|
6 " Last Change: 2022 Aug 12
|
|
7
|
|
8 if exists("b:did_indent")
|
|
9 finish
|
|
10 endif
|
|
11 let b:did_indent = 1
|
|
12
|
|
13 setlocal lisp autoindent nosmartindent
|
|
14
|
|
15 setlocal lispwords+=module,module*,module+,parameterize,let-values,let*-values,letrec-values,local
|
|
16 setlocal lispwords+=define/contract
|
|
17 setlocal lispwords+=λ
|
|
18 setlocal lispwords+=with-handlers
|
|
19 setlocal lispwords+=define-values,opt-lambda,case-lambda,syntax-rules,with-syntax,syntax-case,syntax-parse
|
|
20 setlocal lispwords+=define-for-syntax,define-syntax-parser,define-syntax-parse-rule,define-syntax-class,define-splicing-syntax-class
|
|
21 setlocal lispwords+=define-signature,unit,unit/sig,compund-unit/sig,define-values/invoke-unit/sig
|
|
22 setlocal lispwords+=define-opt/c,define-syntax-rule
|
|
23 setlocal lispwords+=define-test-suite
|
|
24 setlocal lispwords+=struct
|
|
25 setlocal lispwords+=with-input-from-file,with-output-to-file
|
|
26
|
|
27 " Racket OOP
|
|
28 " TODO missing a lot of define-like forms here (e.g., define/augment, etc.)
|
|
29 setlocal lispwords+=class,class*,mixin,interface,class/derived
|
|
30 setlocal lispwords+=define/public,define/pubment,define/public-final
|
|
31 setlocal lispwords+=define/override,define/overment,define/override-final
|
|
32 setlocal lispwords+=define/augment,define/augride,define/augment-final
|
|
33 setlocal lispwords+=define/private
|
|
34
|
|
35 " kanren
|
|
36 setlocal lispwords+=fresh,run,run*,project,conde,condu
|
|
37
|
|
38 " loops
|
|
39 setlocal lispwords+=for,for/list,for/fold,for*,for*/list,for*/fold,for/or,for/and,for*/or,for*/and
|
|
40 setlocal lispwords+=for/hash,for/hasheq,for/hasheqv,for/sum,for/flvector,for*/flvector,for/vector,for*/vector,for*/sum,for*/hash,for*/hasheq,for*/hasheqv
|
|
41 setlocal lispwords+=for/async
|
|
42 setlocal lispwords+=for/set,for*/set
|
|
43 setlocal lispwords+=for/first,for*/first
|
|
44
|
|
45 setlocal lispwords+=match,match*,match/values,define/match,match-lambda,match-lambda*,match-lambda**
|
|
46 setlocal lispwords+=match-let,match-let*,match-let-values,match-let*-values
|
|
47 setlocal lispwords+=match-letrec,match-define,match-define-values
|
|
48
|
|
49 setlocal lispwords+=let/cc,let/ec
|
|
50
|
|
51 " qi
|
|
52 setlocal lispwords+=define-flow,define-switch,flow-lambda,switch-lambda,on,switch,π,λ01
|
|
53 setlocal lispwords+=define-qi-syntax,define-qi-syntax-parser,define-qi-syntax-rule
|
|
54
|
|
55 " gui-easy
|
|
56 setlocal lispwords+=if-view,case-view,cond-view,list-view,dyn-view
|
|
57 setlocal lispwords+=case/dep
|
|
58 setlocal lispwords+=define/obs
|
|
59
|
|
60 let b:undo_indent = "setlocal lisp< ai< si< lw<"
|