-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tweak(ligature): make it obsolete, buggy when the font have no ligatures
- Loading branch information
1 parent
383fe1a
commit 2392012
Showing
2 changed files
with
40 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
;;; me-ligature.el --- Ligatures -*- lexical-binding: t; -*- | ||
|
||
;; Copyright (C) 2022-2023 Abdelhak Bougouffa | ||
|
||
;; Author: Abdelhak Bougouffa (concat "abougouffa" "@" "fedora" "project" "." "org") | ||
|
||
;;; Commentary: | ||
|
||
;;; Code: | ||
|
||
(use-package ligature | ||
:straight t | ||
:when (and (>= emacs-major-version 28) (+emacs-features-p 'harfbuzz 'cairo)) | ||
:after minemacs-loaded | ||
:hook (prog-mode . ligature-mode) | ||
: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 | ||
(ligature-set-ligatures | ||
'prog-mode | ||
'("|||>" "<|||" "<==>" "<!--" "####" "~~>" "***" "||=" "||>" ":::" "::=" | ||
"=:=" "===" "==>" "=!=" "=>>" "=<<" "=/=" "!==" "!!." ">=>" ">>=" ">>>" | ||
">>-" ">->" "->>" "-->" "---" "-<<" "<~~" "<~>" "<*>" "<||" "<|>" "<$>" | ||
"<==" "<=>" "<=<" "<->" "<--" "<-<" "<<=" "<<-" "<<<" "<+>" "</>" "###" | ||
"#_(" "..<" "..." "+++" "/==" "///" "_|_" "www" "&&" "^=" "~~" "~@" "~=" | ||
"~>" "~-" "**" "*>" "*/" "||" "|}" "|]" "|=" "|>" "|-" "{|" "[|" "]#" "::" | ||
":=" ":>" ":<" "$>" "==" "=>" "!=" "!!" ">:" ">=" ">>" ">-" "-~" "-|" "->" | ||
"--" "-<" "<~" "<*" "<|" "<:" "<$" "<=" "<>" "<-" "<<" "<+" "</" "#{" "#[" | ||
"#:" "#=" "#!" "##" "#(" "#?" "#_" "%%" ".=" ".-" ".." ".?" "+>" "++" "?:" | ||
"?=" "?." "??" ";;" "/*" "/=" "/>" "//" "__" "~~" "(*" "*)" "\\\\" "://"))) | ||
|
||
|
||
(provide 'obsolete/me-ligature) | ||
|
||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
;;; me-ligature.el ends here |