diff --git a/configuration.org b/configuration.org index 54f22ae..c2e70f8 100644 --- a/configuration.org +++ b/configuration.org @@ -128,6 +128,80 @@ (trailing-whitespace ((t (:inherit nil :background "red3"))))) #+end_src +** Use ligatures + +#+begin_src emacs-lisp +(use-package ligature + :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 and Fira Code ligatures in programming modes + (ligature-set-ligatures 'prog-mode + '(;; == === ==== => =| =>>=>=|=>==>> ==< =/=//=// =~ + ;; =:= =!= + ("=" (rx (+ (or ">" "<" "|" "/" "~" ":" "!" "=")))) + ;; ;; ;;; + (";" (rx (+ ";"))) + ;; && &&& + ("&" (rx (+ "&"))) + ;; !! !!! !. !: !!. != !== !~ + ("!" (rx (+ (or "=" "!" "\." ":" "~")))) + ;; ?? ??? ?: ?= ?. + ("?" (rx (or ":" "=" "\." (+ "?")))) + ;; %% %%% + ("%" (rx (+ "%"))) + ;; |> ||> |||> ||||> |] |} || ||| |-> ||-|| + ;; |->>-||-<<-| |- |== ||=|| + ;; |==>>==<<==<=>==//==/=!==:===> + ("|" (rx (+ (or ">" "<" "|" "/" ":" "!" "}" "\]" + "-" "=" )))) + ;; \\ \\\ \/ + ("\\" (rx (or "/" (+ "\\")))) + ;; ++ +++ ++++ +> + ("+" (rx (or ">" (+ "+")))) + ;; :: ::: :::: :> :< := :// ::= + (":" (rx (or ">" "<" "=" "//" ":=" (+ ":")))) + ;; // /// //// /\ /* /> /===:===!=//===>>==>==/ + ("/" (rx (+ (or ">" "<" "|" "/" "\\" "\*" ":" "!" + "=")))) + ;; .. ... .... .= .- .? ..= ..< + ("\." (rx (or "=" "-" "\?" "\.=" "\.<" (+ "\.")))) + ;; -- --- ---- -~ -> ->> -| -|->-->>->--<<-| + ("-" (rx (+ (or ">" "<" "|" "~" "-")))) + ;; *> */ *) ** *** **** + ("*" (rx (or ">" "/" ")" (+ "*")))) + ;; www wwww + ("w" (rx (+ "w"))) + ;; <>