aboutsummaryrefslogtreecommitdiff
path: root/ligature_plugins/haskell.vim
diff options
context:
space:
mode:
authorNerdyPepper <[email protected]>2018-02-13 08:07:54 +0000
committerNerdyPepper <[email protected]>2018-02-13 08:07:54 +0000
commit1492427be5317478f040aff795439eb092173e6b (patch)
tree912dd8561c277834f1aaf91099fb67a9510c937e /ligature_plugins/haskell.vim
parentbc103b46c0e79e9e6901e26b850ff620e1f41ec6 (diff)
Add plugins for ligatures
Diffstat (limited to 'ligature_plugins/haskell.vim')
-rw-r--r--ligature_plugins/haskell.vim77
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
6set conceallevel=1
7
8" lambda's
9syntax match hsLambda "\\" conceal cchar=λ
10
11" function composition
12syntax match hsCompose / \. /ms=s+1,me=e-1 conceal cchar=·
13
14" ->
15syn match MHArrow /->/ contains=MHArrowM,MHArrowH
16syn match MHArrowM /-/ contained containedin=MHArrow conceal cchar=
17syn match MHArrowH /-\@<=>/ contained containedin=MHArrow conceal cchar=→
18
19" <-
20syn match HMArrow /<\ze-/ contains=HMArrowM,HMArrowH
21syn match HMArrowH /</ contained containedin=HMArrow conceal cchar=←
22
23" =>
24syn match DMHArrow /=>/ contains=DMHArrowM,DMHArrowH
25syn match DMHArrowM /=/ contained containedin=DMHArrow conceal cchar=
26syn match DMHArrowH /=\@<=>/ contained containedin=DMHArrow conceal cchar=⇒
27
28" >>=
29syn match DTTMArrow />>\ze=/ contains=DTTMArrowT,DTTMArrowTT
30syn match DTTMArrowTT />/ contained containedin=DTTMArrow conceal cchar=
31syn match DTTMArrowT />\@<=>/ contained containedin=DTTMArrow conceal cchar=
32
33" >=>
34syn match DTMHArrow />=>/ contains=DTMHArrowT,DTMHArrowM,DTMHArrowH
35syn match DTMHArrowT />/ contained containedin=DTMHArrow conceal cchar=
36syn match DTMHArrowM /=/ contained containedin=DTMHArrow conceal cchar=
37syn match DTMHArrowH /=\@<=>/ contained containedin=DTMHArrow conceal cchar=⇒
38
39" <=<
40syn match DHMTArrow /<=</ contains=DHMTArrowM,DHMTArrowH,DHMTArrowT
41syn match DHMTArrowH /</ contained containedin=DHMTArrow conceal cchar=⇐
42syn match DHMTArrowM /=/ contained containedin=DHMTArrow conceal cchar=
43syn match DHMTArrowT /=\@<=</ contained containedin=DHMTArrow conceal cchar=
44
45" =<<
46syn match DMTTArrow /=<</ contains=DMTTArrowT,DMTTArrowTT,DMTTArrowM
47syn match DMTTArrowM /=/ contained containedin=DMTTArrow conceal cchar=
48syn match DMTTArrowT /</ contained containedin=DMTTArrow conceal cchar=
49syn match DMTTArrowTT /<\@<=</ contained containedin=DMTTArrow conceal cchar=<
50
51" -<
52syn match MTArrow /-</ contains=MTArrowT,MTArrowM
53syn match MTArrowT /-/ contained containedin=MTArrow conceal cchar=
54syn match MTArrowM /-\@<=</ contained containedin=MTArrow conceal cchar=⤙
55
56" -<<
57syn match MTTArrow /-<</ contains=MTTArrowT,MTTArrowM,HTTArrowTT
58syn match MTTArrowM /-<</me=s+1 contained containedin=MTTArrow conceal cchar=
59syn match MTTArrowT /-\@<=</ contained containedin=MTTArrow conceal cchar=⤛
60syn match MTTArrowTT /\(-<\)\@<=</ contained containedin=MTTArrow conceal cchar=<
61
62" >-
63syn match TMArrow />\ze-/ contains=TMArrowT,TMArrowM
64syn match TMArrowT />/ contained containedin=TMArrow conceal cchar=⤚
65
66">>-
67syn match TTMArrow />>\ze-/ contains=TTMArrowT,TTMArrowTT,TTMArrowTTT
68syn match TTMArrowTT />/ contained containedin=TTMArrow conceal cchar=
69syn match TTMArrowT />\@<=>/ contained containedin=TTMArrow conceal cchar=⤜
70syn 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.