diff options
author | Akshay <[email protected]> | 2020-04-14 06:40:27 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2020-04-14 06:40:27 +0100 |
commit | 17d7476fbc4895a05998db7e1a8357ea24ee25fd (patch) | |
tree | c1e32af8c3453a67824a00f6a125e39dfcde83fa /ligature_plugins | |
parent | 86dfb2b9201a4690aa11101e8060d55a2166d279 (diff) |
improve haskell ligatures, add rust ligature conceals
Diffstat (limited to 'ligature_plugins')
-rw-r--r-- | ligature_plugins/haskell.vim | 3 | ||||
-rw-r--r-- | ligature_plugins/ocaml.vim | 2 | ||||
-rw-r--r-- | ligature_plugins/rust.vim | 21 |
3 files changed, 24 insertions, 2 deletions
diff --git a/ligature_plugins/haskell.vim b/ligature_plugins/haskell.vim index e582dc7..7277d85 100644 --- a/ligature_plugins/haskell.vim +++ b/ligature_plugins/haskell.vim | |||
@@ -26,9 +26,10 @@ syn match DMHArrowM /=/ contained containedin=DMHArrow conceal cchar= | |||
26 | syn match DMHArrowH /=\@<=>/ contained containedin=DMHArrow conceal cchar=⇒ | 26 | syn match DMHArrowH /=\@<=>/ contained containedin=DMHArrow conceal cchar=⇒ |
27 | 27 | ||
28 | " >>= | 28 | " >>= |
29 | syn match DTTMArrow />>\ze=/ contains=DTTMArrowT,DTTMArrowTT | 29 | syn match DTTMArrow />>\ze=/ contains=DTTMArrowT,DTTMArrowTT,DTTMArrowH |
30 | syn match DTTMArrowTT />/ contained containedin=DTTMArrow conceal cchar= | 30 | syn match DTTMArrowTT />/ contained containedin=DTTMArrow conceal cchar= |
31 | syn match DTTMArrowT />\@<=>/ contained containedin=DTTMArrow conceal cchar= | 31 | syn match DTTMArrowT />\@<=>/ contained containedin=DTTMArrow conceal cchar= |
32 | syn match DTTMArrowH /=\@<=>/ contained containedin=DTTMArrow conceal cchar= | ||
32 | 33 | ||
33 | " >=> | 34 | " >=> |
34 | syn match DTMHArrow />=>/ contains=DTMHArrowT,DTMHArrowM,DTMHArrowH | 35 | syn match DTMHArrow />=>/ contains=DTMHArrowT,DTMHArrowM,DTMHArrowH |
diff --git a/ligature_plugins/ocaml.vim b/ligature_plugins/ocaml.vim index 14c78e5..c966379 100644 --- a/ligature_plugins/ocaml.vim +++ b/ligature_plugins/ocaml.vim | |||
@@ -20,7 +20,7 @@ syntax match ocamlArrowH /-\@<=>/ contained containedin=ocamlArrow conceal cc | |||
20 | syntax match ocamlArrow /<\ze-/ contains=ocamlArrowM,ocamlArrowH | 20 | syntax match ocamlArrow /<\ze-/ contains=ocamlArrowM,ocamlArrowH |
21 | syntax match ocamlArrowH /</ contained containedin=ocamlArrow conceal cchar=← | 21 | syntax match ocamlArrowH /</ contained containedin=ocamlArrow conceal cchar=← |
22 | 22 | ||
23 | " <> | 23 | " <> |
24 | syntax match ocamlNiceOperator "<>" conceal cchar=≠ | 24 | syntax match ocamlNiceOperator "<>" conceal cchar=≠ |
25 | 25 | ||
26 | " greek letters | 26 | " greek letters |
diff --git a/ligature_plugins/rust.vim b/ligature_plugins/rust.vim new file mode 100644 index 0000000..a4a3d41 --- /dev/null +++ b/ligature_plugins/rust.vim | |||
@@ -0,0 +1,21 @@ | |||
1 | setlocal conceallevel=1 | ||
2 | syntax clear rustOperator | ||
3 | |||
4 | syntax match rustBelleOperator "<=" conceal cchar=≤ | ||
5 | syntax match rustBelleOperator ">=" conceal cchar=≥ | ||
6 | syntax match rustBelleOperator "!=" conceal cchar=≠ | ||
7 | |||
8 | " -> | ||
9 | syn match rustArrowCharacter /->/ contains=PointerTail,PointerHead | ||
10 | syn match PointerTail /-/ contained containedin=rustReturn conceal cchar= | ||
11 | syn match PointerHead /-\@<=>/ contained containedin=rustReturn conceal cchar=→ | ||
12 | |||
13 | " => | ||
14 | syn match rustImplies /=>/ contains=ImpliesTail,ImpliesHead | ||
15 | syn match ImpliesTail /=/ contained containedin=rustImplies conceal cchar= | ||
16 | syn match ImpliesHead /=\@<=>/ contained containedin=rustImplies conceal cchar=⇒ | ||
17 | |||
18 | " == | ||
19 | syn match rustIsEqual /==/ contains=FirstEqual,SecondEqual | ||
20 | syn match FirstEqual /=/ contained containedin=rustIsEqual conceal cchar= | ||
21 | syn match SecondEqual /=\@<=>/ contained containedin=rustIsEqual conceal cchar= | ||