Skip to content

Commit

Permalink
fonts; use only JetBrains Font ligatures
Browse files Browse the repository at this point in the history
  • Loading branch information
semenInRussia committed Jun 12, 2024
1 parent f82bf79 commit da2bd38
Showing 1 changed file with 32 additions and 27 deletions.
59 changes: 32 additions & 27 deletions lisp/my-fonts.el
Original file line number Diff line number Diff line change
Expand Up @@ -34,37 +34,42 @@
my-fonts-size))
default-frame-alist)

(leaf ligature
:ensure t
:config
;; Enable the "www" ligature in every possible major mode
(ligature-set-ligatures 't '("www"))
;; Enable traditional ligature support in eww-mode, if the
;; `variable-pitch' face supports it
(ligature-set-ligatures 'eww-mode '("ff" "fi" "ffi"))
;; Enable all Cascadia Code ligatures in programming modes
(mapc
(lambda (it)
(ligature-set-ligatures it '("-|" "-~" "---" "-<<" "-<" "--" "->" "->>" "-->" "///" "/=" "/=="
"/>" "//" "/*" "*>" "***" "*/" "<-" "<<-" "<=>" "<=" "<|" "<||"
"<|||" "<|>" "<:" "<>" "<-<" "<<<" "<==" "<<=" "<=<" "<==>" "<-|"
"<<" "<~>" "<=|" "<~~" "<~" "<$>" "<$" "<+>" "<+" "</>" "</" "<*"
"<*>" "<->" "<!--" ":>" ":<" ":::" "::" ":?" ":?>" ":=" "::=" "=>>"
"==>" "=/=" "=!=" "=>" "===" "=:=" "==" "!==" "!!" "!=" ">]" ">:"
">>-" ">>=" ">=>" ">>>" ">-" ">=" "&&&" "&&" "|||>" "||>" "|>" "|]"
"|}" "|=>" "|->" "|=" "||-" "|-" "||=" "||" ".." ".?" ".=" ".-" "..<"
"..." "+++" "+>" "++" "[||]" "[<" "[|" "{|" "??" "?." "?=" "?:" "##"
"###" "####" "#[" "#{" "#=" "#!" "#:" "#_(" "#_" "#?" "#(" ";;" "_|_"
"__" "~~" "~~>" "~>" "~-" "~@" "$>" "^=" "]#")))
'(prog-mode text-mode))
;; Enables ligature checks globally in all buffers. You can also do it
;; per mode with `ligature-mode'.
(global-ligature-mode t))

(prefer-coding-system 'utf-8)
(set-default-coding-systems 'utf-8)
(set-language-environment 'utf-8)
(set-selection-coding-system 'utf-8)

(leaf ligature
:commands ligature-set-ligatures global-ligature-mode
:config
(ligature-set-ligatures 'prog-mode '("--" "---" "==" "===" "!="
"!==" "=!=" "=:=" "=/=" "<="
">=" "&&" "&&&" "&=" "++" "+++"
"***" ";;" "!!" "??" "???"
"?:" "?." "?=" "<:" ":<" ":>"
">:" "<:<" "<>" "<<<" ">>>"
"<<" ">>" "||" "-|" "_|_" "|-"
"||-" "|=" "||=" "##" "###"
"####" "#{" "#[" "]#" "#(" "#?"
"#_" "#_(" "#:" "#!" "#=" "^="
"<$>" "<$" "$>" "<+>" "<+" "+>"
"<*>" "<*" "*>" "</" "</>" "/>"
"<!--" "<#--" "-->" "->" "->>"
"<<-" "<-" "<=<" "=<<" "<<="
"<==" "<=>" "<==>" "==>" "=>"
"=>>" ">=>" ">>=" ">>-" ">-"
"-<" "-<<" ">->" "<-<" "<-|"
"<=|" "|=>" "|->" "<->" "<~~"
"<~" "<~>" "~~" "~~>" "~>" "~-"
"-~" "~@" "[||]" "|]" "[|" "|}"
"{|" "[<" ">]" "|>" "<|" "||>"
"<||" "|||>" "<|||" "<|>" "..."
".." ".=" "..<" ".?" "::" ":::"
":=" "::=" ":?" ":?>" "//"
"///" "/*" "*/" "/=" "//="
"/==" "@_" "__" "???" "<:<"
";;;"))
(global-ligature-mode t))

(provide 'my-fonts)
;;; my-fonts.el ends here

0 comments on commit da2bd38

Please sign in to comment.