Skip to content

Commit ae65071

Browse files
committed
tweak(ligature): compile a list of ligatures from several fonts
1 parent 8972713 commit ae65071

File tree

1 file changed

+28
-11
lines changed

1 file changed

+28
-11
lines changed

modules/me-ui.el

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
;; Author: Abdelhak Bougouffa (rot13 "nobhtbhssn@srqbencebwrpg.bet")
66
;; Created: 2022-09-20
7-
;; Last modified: 2025-05-05
7+
;; Last modified: 2025-05-06
88

99
;;; Commentary:
1010

@@ -165,21 +165,38 @@
165165
:straight t
166166
:when (and (featurep 'feat/harfbuzz) (featurep 'feat/cairo) (version<= "1.16.0" cairo-version-string))
167167
:hook (prog-mode . ligature-mode)
168+
:hook (minemacs-after-setup-fonts . ligature-generate-ligatures)
168169
:config
169170
(ligature-set-ligatures 't '("www"))
170171
(ligature-set-ligatures 'eww-mode '("ff" "fi" "ffi"))
172+
;; A list of ligatures compiled from several fonts:
173+
;; - JetBrains Mono: https://www.jetbrains.com/lp/mono/
174+
;; - Fira Code: https://github.com/tonsky/FiraCode/wiki/Emacs-instructions
175+
;; - Iosevka: https://typeof.net/Iosevka/customizer
176+
;; - Cascadia Code: https://github.com/microsoft/cascadia-code/wiki/Coding-ligature-coverage
171177
(ligature-set-ligatures
172178
'prog-mode
173-
'("**" "***" "**/" "*>" "*/" "\\\\" "\\\\\\" "{-" "::"
174-
":::" ":=" "!!" "!=" "!==" "-}" "----" "-->" "->" "->>"
175-
"-<" "-<<" "-~" "#{" "#[" "##" "###" "####" "#(" "#?" "#_"
176-
"#_(" ".-" ".=" ".." "..<" "..." "?=" "??" ";;" "/*" "/**"
177-
"/=" "/==" "/>" "//" "///" "&&" "||" "||=" "|=" "|>" "^=" "$>"
178-
"++" "+++" "+>" "=:=" "==" "===" "==>" "=>" "=>>" "<="
179-
"=<<" "=/=" ">-" ">=" ">=>" ">>" ">>-" ">>=" ">>>" "<*"
180-
"<*>" "<|" "<|>" "<$" "<$>" "<!--" "<-" "<--" "<->" "<+"
181-
"<+>" "<=" "<==" "<=>" "<=<" "<>" "<<" "<<-" "<<=" "<<<"
182-
"<~" "<~~" "</" "</>" "~@" "~-" "~>" "~~" "~~>" "%%")))
179+
'("!!" "!!." "!." "!:" "!=" "!==" "!===" "#!" "##" "###" "####"
180+
"#(" "#:" "#=" "#?" "#[" "#_" "#_(" "#{" "$>" "%%" "&&" "&&&"
181+
"&=" "(*" "*)" "**" "***" "**/" "*+" "*/" "*=" "*>" "+*" "++"
182+
"+++" "+>" "--" "---" "----" "--->" "-->" "-<" "-<-" "-<<"
183+
"->" "->-" "->>" "-|" "-}" "-~" ".-" ".." "..." "..<" "..="
184+
".=" ".>" ".?" "/*" "/**" "//" "///" "//=" "//==//==//" "/="
185+
"/==" "/==/==/" "/>" "/\\" "://" "::" ":::" "::=" ":<" ":="
186+
":>" ":?" ":?>" ";;" ";;;" "<!--" "<!---" "<#--" "<$" "<$>"
187+
"<*" "<*>" "<+" "<+>" "<-" "<--" "<---" "<---->" "<--->"
188+
"<--<--<" "<-->" "<-<" "<->" "<-|" "<." "<.>" "</" "</>" "<:"
189+
"<:<" "<<" "<<-" "<<--<<--<<" "<<<" "<<=" "<<==<<==<<" "<="
190+
"<=<" "<==" "<==<==<" "<===" "<====>" "<===>" "<==>" "<=>"
191+
"<=|" "<>" "<|" "<|>" "<||" "<|||" "<~" "<~>" "<~~" "=!="
192+
"=*" "=/=" "=:" "=:=" "=<" "=<<" "=<=" "==" "===" "===>"
193+
"==>" "=>" "=>=" "=>>" ">-" ">-->-->" ">->" ">:" ">="
194+
">==>==>" ">=>" ">>" ">>-" ">>-->>-->>" ">>=" ">>==>>==>>"
195+
">>>" ">]" "?." "?:" "?=" "??" "??=" "???" "@_" "[<" "[|"
196+
"[||]" "\\/" "\\\\" "\\\\\\" "]#" "^=" "__" "__|__" "_|_"
197+
"{-" "{|" "|-" "|--|--|" "|->" "|=" "|==|==|" "|=>" "|>" "|]"
198+
"||" "||-" "||--||--||" "||=" "||==||==||" "||>" "|||" "|||>"
199+
"|}" "}#" "~-" "~=" "~>" "~@" "~~" "~~>")))
183200

184201

185202
(provide 'me-ui)

0 commit comments

Comments
 (0)