From ee5d0aa71afabd4869715aee54c6a5ac8add258d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9ana=20=E6=B1=9F?= Date: Tue, 19 Aug 2025 11:10:27 +0200 Subject: [PATCH] packages/iosevka: cherry-pick ligature set --- nix/overlays/iosevka.nix | 90 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 89 insertions(+), 1 deletion(-) diff --git a/nix/overlays/iosevka.nix b/nix/overlays/iosevka.nix index e1878f4d..75577a24 100644 --- a/nix/overlays/iosevka.nix +++ b/nix/overlays/iosevka.nix @@ -76,7 +76,95 @@ final: prev: rec { Italic.css = "italic"; }; - ligations.inherits = "haskell"; + # The ligatures are defined based on Haskell and Nix usages. + # + # Follow: for more details + ligations.enables = [ + "arrow-l" # Left-pointing arrows + # "arrow-l-hyphen" # Left-pointing arrows with hyphen-minus (-) being the rod + # "arrow-l-equal" # Left-pointing arrows with equal sign (=) being the rod + # "arrow-l-wave" # Left-pointing arrows with tilde (~) being the rod + + "arrow-r" # Right-pointing arrows + # "arrow-r-hyphen" # Right-pointing arrows with hyphen-minus (-) being the rod + # "arrow-r-equal" # Right-pointing arrows with equal sign (=) being the rod + # "arrow-r-wave" # Right-pointing arrows with tilde (~) being the rod + + "arrow-lr" # Dual-pointing arrows + # "arrow-lr-hyphen" # Dual-pointing arrows with hyphen-minus (-) being the rod + # "arrow-lr-equal" # Dual-pointing arrows with equal sign (=) being the rod + # "arrow-lr-wave" # Dual-pointing arrows with tilde (~) being the rod + + "counter-arrow-l" # Left-pointing counter-arrows + # "counter-arrow-l-hyphen" # Left-pointing counter-arrows with hyphen-minus (-) being the rod + # "counter-arrow-l-equal" # Left-pointing counter-arrows with equal sign (=) being the rod + # "counter-arrow-l-wave" # Left-pointing counter-arrows with tilde (~) being the rod + + "counter-arrow-r" # Right-pointing counter-arrows + # "counter-arrow-r-hyphen" # Right-pointing counter-arrows with hyphen-minus (-) being the rod + # "counter-arrow-r-equal" # Right-pointing counter-arrows with equal sign (=) being the rod + # "counter-arrow-r-wave" # Right-pointing counter-arrows with tilde (~) being the rod + + # "eqeqeq" # Enable special ligation for === with triple lines + "eqeq" # Enable ligation for == and === + "lteq" # Enable ligation for <= as less-than-or-equal sign + # "eqlt" # Enable ligation for =< as less-than-or-equal sign + "gteq" # Enable ligation for >= as greater-than-or-equal sign + # "lteq-separate" # Display <= as separate shape + # "eqlt-separate" # Display =< as separate shape + # "gteq-separate" # Display >= as separate shape + + # "exeqeqeq" # Enable special ligation for !=== with triple lines + # "exeqeq" # Enable special ligation for !== with triple lines + # "eqexeq" # Enable special ligation for =!= with triple lines + # "eqexeq-dl" # Enable special ligation for =!= with double lines + # "exeq" # Enable ligation for != and !== + # "tildeeq" # Enable ligation for ~= as inequality + # "eqslasheq" # Enable special triple-line ligation for =/= as inequality + "slasheq" # Enable ligation for /= and =/= as inequality + "trig" # Enable ligation for <|, |> , <||, and other bar-and-angle-bracket symbols + # "ltgt-ne" # Enable ligation for <> as inequality + "ltgt-diamond" # Enable ligation for <> as diamond + # "ltgt-diamond-tag" # Enable ligation for <> as diamond-shaped empty HTML/XML tag + # "ltgt-slash-tag" # Enable ligation for and + # "brst" # Center asterisk in (* and *) + "slash-asterisk" # Shift asterisk in /* and */ + "kern-dotty" # Move connecting dotty punctuations closer, like for ::, :: # and ... + "kern-bars" # Move consecutive bars closer, like for ||, ||| and // + "center-ops" # Vertically align some of the operators (like *) to the center position it is before or after a "center" operator (like +) + + # These put -. to the same height + # "center-op-trigger-plus-minus-l" # Plus (+) and Minus (-) will trigger other operator characters at left to be centered + # "center-op-trigger-plus-minus-r" # Plus (+) and Minus (-) will trigger other operator characters at right to be centered + + # These put *= to the same height + # "center-op-trigger-equal-l" # Equal (=) will trigger other operator characters at left to be centered + # "center-op-trigger-equal-r" # Equal (=) will trigger other operator characters at right to be centered + + "center-op-trigger-bar-l" # Bars (|) will trigger other operator characters at left to be centered + "center-op-trigger-bar-r" # Bars (|) will trigger other operator characters at right to be centered + "center-op-trigger-angle-inside" # Less (<) and Greater (>) will trigger other operator characters at inside to be centered + "center-op-trigger-angle-outside" # Less (<) and Greater (>) will trigger other operator characters at outside to be centered + "center-op-influence-dot" # Treat dot (.) as operator and perform chained centering + "center-op-influence-colon" # Treat colon (:) as operator and perform chained centering + "tilde-tilde" # Make 2 or more contiguous ASCII tildes (like ~~, ~~~ and ~~~~) connected as a wave line + # "tilde-tilde-tilde" # Make 3 or more contiguous ASCII tildes (like ~~~ and ~~~~) connected as a wave line + # "minus-minus" # Make 2 or more contiguous hyphen-minuses (like --, --- and ----) connected as a straight solid line + # "minus-minus-minus" # Make 3 or more contiguous hyphen-minuses (like --- and ----) connected as a straight solid line + # "plus-plus" # Make 2 or more contiguous plus signs (like ++, +++ and ++++) connected. + # "plus-plus-plus" # Make 3 or more contiguous plus signs (like +++ and ++++) connected. + # "underscore-underscore" # Make 2 or more contiguous underscores (like __, ___ and ____) connected + # "underscore-underscore-underscore" # Make 3 or more contiguous underscores (like ___ and ____) connected + # "hash-hash" # Make 2 or more contiguous hash signs (number signs) (like ##, ### and ####) connected + # "hash-hash-hash" # Make 3 or more contiguous hash signs (number signs) (like ## and ###) connected + # "logic" # Enable ligation for /\ and \/ + # "llgg" # Enable ligation for <<, >> and other angle-bracket chaining + # "llggeq" # Enable ligation for <<=, >>= as shift operator + # "html-comment" # Enable ligation for