From 1c2401fc2cccbfda5a0b371aedca2c16b7e505f9 Mon Sep 17 00:00:00 2001 From: Charlotte Van Petegem Date: Mon, 4 Apr 2022 13:00:22 +0200 Subject: [PATCH] Use ligature.el for ligatures in emacs --- modules/graphical/default.nix | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/modules/graphical/default.nix b/modules/graphical/default.nix index 874117d4..a32e0d0b 100644 --- a/modules/graphical/default.nix +++ b/modules/graphical/default.nix @@ -1,5 +1,13 @@ { config, lib, pkgs, ... }: +let + ligature = pkgs.fetchFromGitHub { + owner = "mickeynp"; + repo = "ligature.el"; + rev = "9357156a917a021a87b33ee391567a5d8e44794a"; + hash = "sha256-Bgb5wFyx0hMilpihxA8cTrRVw71EBOw2DczlM4lSNMs="; + }; +in { imports = [ ./firefox @@ -26,9 +34,22 @@ emacs.extraConfig = [ '' ;; Ligatures in GUI mode - ;; Should probably switch to ligature.el, but it isn't on MELPA (yet). - (use-package fira-code-mode :config (when window-system (global-fira-code-mode))) - + (use-package ligature + :load-path "${ligature}" + :config + (ligature-set-ligatures 't '("www" "**" "***" "**/" "*>" "*/" "\\\\" "\\\\\\" "{-" "::" + ":::" ":=" "!!" "!=" "!==" "-}" "----" "-->" "->" "->>" + "-<" "-<<" "-~" "#{" "#[" "##" "###" "####" "#(" "#?" "#_" + "#_(" ".-" ".=" ".." "..<" "..." "?=" "??" ";;" "/*" "/**" + "/=" "/==" "/>" "//" "///" "&&" "||" "||=" "|=" "|>" "^=" "$>" + "++" "+++" "+>" "=:=" "==" "===" "==>" "=>" "=>>" "<=" + "=<<" "=/=" ">-" ">=" ">=>" ">>" ">>-" ">>=" ">>>" "<*" + "<*>" "<|" "<|>" "<$" "<$>" "