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
|
||||
:after fontaine
|
||||
:config
|
||||
(defun to/set-ligatures-for-font-iosevka ()
|
||||
(when (string= "Iosevka Comfy" (face-attribute 'default :family))
|
||||
(ligature-set-ligatures
|
||||
'prog-mode '("<---" "<--" "<<-" "<-" "->" "-->" "--->" "<->" "<-->" "<--->" "<---->" "<!--"
|
||||
"<==" "<===" "<=" "=>" "=>>" "==>" "===>" ">=" "<=>" "<==>" "<===>" "<====>" "<!---"
|
||||
"<~~" "<~" "~>" "~~>" "::" ":::" "==" "!=" "===" "!=="
|
||||
":=" ":-" ":+" "<*" "<*>" "*>" "<|" "<|>" "|>" "+:" "-:" "=:" "<******>" "++" "+++"))))
|
||||
(defun to/set-ligatures-for-font (font-family)
|
||||
(let ((ligatures
|
||||
(cond ((string= font-family "Iosevka Comfy")
|
||||
'("<---" "<--" "<<-" "<-" "->" "-->" "--->" "<->" "<-->" "<--->"
|
||||
"<---->" "<!--" "<==" "<===" "<=" "=>" "=>>" "==>" "===>" ">="
|
||||
"<=>" "<==>" "<===>" "<====>" "<!---" "<~~" "<~" "~>" "~~>" "::"
|
||||
":::" "==" "!=" "===" "!==" ":=" ":-" ":+" "<*" "<*>" "*>" "<|"
|
||||
"<|>" "|>" "+:" "-:" "=:" "<******>" "++" "+++"))
|
||||
((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))
|
||||
|
||||
(use-package magit
|
||||
|
|
@ -363,7 +377,7 @@
|
|||
|
||||
(use-package magit-todos
|
||||
:after magit
|
||||
:config
|
||||
:configp
|
||||
(magit-todos-mode 1))
|
||||
|
||||
(use-package marginalia
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue