diff options
author | NerdyPepper <[email protected]> | 2018-02-13 08:07:54 +0000 |
---|---|---|
committer | NerdyPepper <[email protected]> | 2018-02-13 08:07:54 +0000 |
commit | 1492427be5317478f040aff795439eb092173e6b (patch) | |
tree | 912dd8561c277834f1aaf91099fb67a9510c937e /ligature_plugins/haskell.vim | |
parent | bc103b46c0e79e9e6901e26b850ff620e1f41ec6 (diff) |
Add plugins for ligatures
Diffstat (limited to 'ligature_plugins/haskell.vim')
-rw-r--r-- | ligature_plugins/haskell.vim | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/ligature_plugins/haskell.vim b/ligature_plugins/haskell.vim new file mode 100644 index 0000000..b556b0a --- /dev/null +++ b/ligature_plugins/haskell.vim | |||
@@ -0,0 +1,77 @@ | |||
1 | " 5px wide equals | ||
2 | " 5px wide minus | ||
3 | |||
4 | |||
5 | " set correct conceal | ||
6 | set conceallevel=1 | ||
7 | |||
8 | " lambda's | ||
9 | syntax match hsLambda "\\" conceal cchar=λ | ||
10 | |||
11 | " function composition | ||
12 | syntax match hsCompose / \. /ms=s+1,me=e-1 conceal cchar=· | ||
13 | |||
14 | " -> | ||
15 | syn match MHArrow /->/ contains=MHArrowM,MHArrowH | ||
16 | syn match MHArrowM /-/ contained containedin=MHArrow conceal cchar= | ||
17 | syn match MHArrowH /-\@<=>/ contained containedin=MHArrow conceal cchar=→ | ||
18 | |||
19 | " <- | ||
20 | syn match HMArrow /<\ze-/ contains=HMArrowM,HMArrowH | ||
21 | syn match HMArrowH /</ contained containedin=HMArrow conceal cchar=← | ||
22 | |||
23 | " => | ||
24 | syn match DMHArrow /=>/ contains=DMHArrowM,DMHArrowH | ||
25 | syn match DMHArrowM /=/ contained containedin=DMHArrow conceal cchar= | ||
26 | syn match DMHArrowH /=\@<=>/ contained containedin=DMHArrow conceal cchar=⇒ | ||
27 | |||
28 | " >>= | ||
29 | syn match DTTMArrow />>\ze=/ contains=DTTMArrowT,DTTMArrowTT | ||
30 | syn match DTTMArrowTT />/ contained containedin=DTTMArrow conceal cchar= | ||
31 | syn match DTTMArrowT />\@<=>/ contained containedin=DTTMArrow conceal cchar= | ||
32 | |||
33 | " >=> | ||
34 | syn match DTMHArrow />=>/ contains=DTMHArrowT,DTMHArrowM,DTMHArrowH | ||
35 | syn match DTMHArrowT />/ contained containedin=DTMHArrow conceal cchar= | ||
36 | syn match DTMHArrowM /=/ contained containedin=DTMHArrow conceal cchar= | ||
37 | syn match DTMHArrowH /=\@<=>/ contained containedin=DTMHArrow conceal cchar=⇒ | ||
38 | |||
39 | " <=< | ||
40 | syn match DHMTArrow /<=</ contains=DHMTArrowM,DHMTArrowH,DHMTArrowT | ||
41 | syn match DHMTArrowH /</ contained containedin=DHMTArrow conceal cchar=⇐ | ||
42 | syn match DHMTArrowM /=/ contained containedin=DHMTArrow conceal cchar= | ||
43 | syn match DHMTArrowT /=\@<=</ contained containedin=DHMTArrow conceal cchar= | ||
44 | |||
45 | " =<< | ||
46 | syn match DMTTArrow /=<</ contains=DMTTArrowT,DMTTArrowTT,DMTTArrowM | ||
47 | syn match DMTTArrowM /=/ contained containedin=DMTTArrow conceal cchar= | ||
48 | syn match DMTTArrowT /</ contained containedin=DMTTArrow conceal cchar= | ||
49 | syn match DMTTArrowTT /<\@<=</ contained containedin=DMTTArrow conceal cchar=< | ||
50 | |||
51 | " -< | ||
52 | syn match MTArrow /-</ contains=MTArrowT,MTArrowM | ||
53 | syn match MTArrowT /-/ contained containedin=MTArrow conceal cchar= | ||
54 | syn match MTArrowM /-\@<=</ contained containedin=MTArrow conceal cchar=⤙ | ||
55 | |||
56 | " -<< | ||
57 | syn match MTTArrow /-<</ contains=MTTArrowT,MTTArrowM,HTTArrowTT | ||
58 | syn match MTTArrowM /-<</me=s+1 contained containedin=MTTArrow conceal cchar= | ||
59 | syn match MTTArrowT /-\@<=</ contained containedin=MTTArrow conceal cchar=⤛ | ||
60 | syn match MTTArrowTT /\(-<\)\@<=</ contained containedin=MTTArrow conceal cchar=< | ||
61 | |||
62 | " >- | ||
63 | syn match TMArrow />\ze-/ contains=TMArrowT,TMArrowM | ||
64 | syn match TMArrowT />/ contained containedin=TMArrow conceal cchar=⤚ | ||
65 | |||
66 | ">>- | ||
67 | syn match TTMArrow />>\ze-/ contains=TTMArrowT,TTMArrowTT,TTMArrowTTT | ||
68 | syn match TTMArrowTT />/ contained containedin=TTMArrow conceal cchar= | ||
69 | syn match TTMArrowT />\@<=>/ contained containedin=TTMArrow conceal cchar=⤜ | ||
70 | syn match TTMArrowTTT /-<</me=s+1 contained containedin=TTMArrow conceal cchar= | ||
71 | |||
72 | " These are probably not all arrow patterns one could come up with, so if you need | ||
73 | " another one and you can't think of how to implement it, please contact me to ask | ||
74 | " for it! I'll try to create the syntax rules. | ||
75 | |||
76 | " Also if you have come up with some more patterns please contact me so I can | ||
77 | " include them in the list. | ||