diff options
Diffstat (limited to 'ligature_plugins/rust.vim')
-rw-r--r-- | ligature_plugins/rust.vim | 21 |
1 files changed, 21 insertions, 0 deletions
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= | ||