-
Notifications
You must be signed in to change notification settings - Fork 0
/
fira-code-ligatures.el
34 lines (34 loc) · 1.92 KB
/
fira-code-ligatures.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
(let ((alist '(
(33 . ".\\(?:\\(?:\\(?:!\\.\\|!\\)\\|\\(?:==\\|=\\)\\)\\)") ;; !
(35 . ".\\(?:\\(?:[!(:={]\\|\\(?:#\\(?:##\\|#\\)\\|#\\)\\|\\?\\|\\[\\|\\(?:_(\\|_\\)\\)\\)") ;; #
(36 . ".\\(?:>\\)") ;; $
(37 . ".\\(?:%\\)") ;; %
(38 . ".\\(?:&\\)") ;; &
(42 . ".\\(?:\\(?:[/>]\\|\\(?:\\*\\*\\|\\*\\)\\)\\)") ;; *
(43 . ".\\(?:\\(?:\\(?:\\+\\+\\|\\+\\)\\|>\\)\\)") ;; +
(45 . ".\\(?:\\(?:[|~]\\|\\(?:-\\(?:-\\|>\\)\\|-\\)\\|\\(?:<<\\|<\\)\\|\\(?:>>\\|>\\)\\)\\)") ;; -
(46 . ".\\(?:\\(?:-\\|\\(?:\\.\\(?:\\.\\|<\\)\\|\\.\\)\\|=\\|\\?\\)\\)") ;; .
(47 . ".\\(?:\\(?:[>\\]\\|\\*\\|\\(?://\\|/\\)\\|\\(?:==\\|=\\)\\)\\)") ;; /
(48 . ".\\(?:x[0-9A-Fa-f]\\)") ;; 0
(58 . ".\\(?:\\(?:[<->]\\|\\(?::[:=]\\|:\\)\\)\\)") ;; :
(59 . ".\\(?:;\\)") ;; ;
(60 . ".\\(?:\\(?:[:>]\\|!--\\|\\(?:\\$>\\|\\$\\)\\|\\(?:\\*>\\|\\*\\)\\|\\(?:\\+>\\|\\+\\)\\|\\(?:-\\(?:[<>|]\\|-\\)\\|-\\)\\|\\(?:/>\\|/\\)\\|\\(?:<\\(?:[<=]\\|-\\)\\|<\\)\\|\\(?:=\\(?:[<>|]\\|\\(?:=>\\|=\\)\\)\\|=\\)\\|\\(?:|\\(?:>\\|\\(?:||\\||\\)\\)\\||\\)\\|\\(?:~[>~]\\|~\\)\\)\\)") ;; <
(61 . ".\\(?:\\(?:!=\\|/=\\|:=\\|<<\\|\\(?:=[=>]\\|=\\)\\|\\(?:>>\\|>\\)\\)\\)") ;; =
(62 . ".\\(?:\\(?:\\(?:->\\|-\\)\\|:\\|\\(?:=>\\|=\\)\\|\\(?:>\\(?:[=>]\\|-\\)\\|>\\)\\)\\)") ;; >
(63 . ".\\(?:\\(?:[:=]\\|\\.\\|\\?\\)\\)") ;; ?
(70 . ".\\(?:l\\)") ;; F
(84 . ".\\(?:l\\)") ;; T
(91 . ".\\(?:\\(?::]\\||\\)\\)") ;; [
(92 . ".\\(?:/\\)") ;; \
(93 . ".\\(?:#\\)") ;; ]
(94 . ".\\(?:=\\)") ;; ^
(95 . ".\\(?:\\(?:_\\||_\\)\\)") ;; _
(102 . ".\\(?:l\\)") ;; f
(119 . ".\\(?:ww\\)") ;; w
(123 . ".\\(?:|\\)") ;; {
(124 . ".\\(?:\\(?:[>}]\\|\\(?:->\\|-\\)\\|\\(?:=>\\|=\\)\\|]\\|\\(?:|\\(?:[=>]\\|-\\||>\\)\\||\\)\\)\\)") ;; |
(126 . ".\\(?:\\(?:[=>@]\\|-\\|\\(?:~>\\|~\\)\\)\\)") ;; ~
)))
(dolist (char-regexp alist)
(set-char-table-range composition-function-table (car char-regexp)
`([,(cdr char-regexp) 0 font-shape-gstring]))))