Set ligatures more generally
This commit is contained in:
parent
b48675956b
commit
58f2110aa5
1 changed files with 23 additions and 9 deletions
|
|
@ -347,15 +347,29 @@
|
||||||
(use-package ligature
|
(use-package ligature
|
||||||
:after fontaine
|
:after fontaine
|
||||||
:config
|
:config
|
||||||
(defun to/set-ligatures-for-font-iosevka ()
|
(defun to/set-ligatures-for-font (font-family)
|
||||||
(when (string= "Iosevka Comfy" (face-attribute 'default :family))
|
(let ((ligatures
|
||||||
(ligature-set-ligatures
|
(cond ((string= font-family "Iosevka Comfy")
|
||||||
'prog-mode '("<---" "<--" "<<-" "<-" "->" "-->" "--->" "<->" "<-->" "<--->" "<---->" "<!--"
|
'("<---" "<--" "<<-" "<-" "->" "-->" "--->" "<->" "<-->" "<--->"
|
||||||
"<==" "<===" "<=" "=>" "=>>" "==>" "===>" ">=" "<=>" "<==>" "<===>" "<====>" "<!---"
|
"<---->" "<!--" "<==" "<===" "<=" "=>" "=>>" "==>" "===>" ">="
|
||||||
"<~~" "<~" "~>" "~~>" "::" ":::" "==" "!=" "===" "!=="
|
"<=>" "<==>" "<===>" "<====>" "<!---" "<~~" "<~" "~>" "~~>" "::"
|
||||||
":=" ":-" ":+" "<*" "<*>" "*>" "<|" "<|>" "|>" "+:" "-:" "=:" "<******>" "++" "+++"))))
|
":::" "==" "!=" "===" "!==" ":=" ":-" ":+" "<*" "<*>" "*>" "<|"
|
||||||
|
"<|>" "|>" "+:" "-:" "=:" "<******>" "++" "+++"))
|
||||||
|
((string= font-family "Cascadia Code")
|
||||||
|
'("www" "--" "---" "-~" "(*" "{|" "}#" "[|" "]#" ".-" ".." "..." "..="
|
||||||
|
"..<" ".?" ".=" "::" ":::" "::=" ":=" "://" ";;" "!." "!:" "!!" "!!."
|
||||||
|
"!=" "!==" "?." "?:" "??" "??=" "?=" "*)" "**" "***" "*>" "*/" "#("
|
||||||
|
"#{" "#[" "#:" "#!" "#?" "#=" "#_" "#_(" "/*" "/>" "//" "///" "/\\"
|
||||||
|
"\\\\" "&&" "|}" "|]" "||" "|||" "|||>" "|>" "$>" "++" "+++" "+>" "=="
|
||||||
|
"===" "=>>" "=<<" ">=" ">>" ">>=" ">>>" "<!--" "<*" "<*>" "<|" "<||"
|
||||||
|
"<|||" "<|>" "<$" "<$>" "<+" "<+>" "<=" "<>" "<<" "<<=" "<<<" "<~"
|
||||||
|
"<~>" "<~~" "</" "</>" "~-" "~@" "~=" "~>" "~~" "~~>" "^=" "%%"))
|
||||||
|
(t
|
||||||
|
'()))))
|
||||||
|
(when (string= font-family (face-attribute 'default :family))
|
||||||
|
(ligature-set-ligatures 'prog-mode ligatures))))
|
||||||
|
|
||||||
(to/set-ligatures-for-font-iosevka)
|
(to/set-ligatures-for-font (face-attribute 'default :family))
|
||||||
(global-ligature-mode t))
|
(global-ligature-mode t))
|
||||||
|
|
||||||
(use-package magit
|
(use-package magit
|
||||||
|
|
@ -363,7 +377,7 @@
|
||||||
|
|
||||||
(use-package magit-todos
|
(use-package magit-todos
|
||||||
:after magit
|
:after magit
|
||||||
:config
|
:configp
|
||||||
(magit-todos-mode 1))
|
(magit-todos-mode 1))
|
||||||
|
|
||||||
(use-package marginalia
|
(use-package marginalia
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue