From 468bac3270524912012b36f17905898b2e7addc5 Mon Sep 17 00:00:00 2001 From: Mars Date: Mon, 12 Aug 2024 03:34:08 -0400 Subject: [PATCH] ligatures and line numbers --- .../aarch64-darwin/marshall@canis/default.nix | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/homes/aarch64-darwin/marshall@canis/default.nix b/homes/aarch64-darwin/marshall@canis/default.nix index 6a2bdc2..baf5370 100644 --- a/homes/aarch64-darwin/marshall@canis/default.nix +++ b/homes/aarch64-darwin/marshall@canis/default.nix @@ -87,6 +87,7 @@ evil-leader flycheck flycheck-inline + ligature lua-mode ns-auto-titlebar nix-mode @@ -112,6 +113,10 @@ ; Set font (set-frame-font "Maple Mono NF 16" nil t) + ; Show line numbers + (add-hook 'prog-mode-hook 'display-line-numbers-mode) + (setq display-line-numbers-type 'relative) + ; Change default indent size to 2 spaces (setq-default indent-tabs-mode nil) ;; Use spaces instead of tabs (setq-default standard-indent 2) ;; Change indent @@ -233,6 +238,26 @@ (treemacs-select-window))) (global-set-key (kbd "C-c C-c") 'my/compile-and-focus-treemacs) + + ; Ligatures + (setq maple-ligatures + '(;; coding ligatures + "" "|||>" "" "->>" "-<<" "..=" "!==" + "#_(" "/==" "||>" "||=" "|->" "===" "==>" "=>>" "=<<" "=/=" ">->" ">=>" + ">>-" ">>=" "<--" "<->" "<-<" "<||" "<|>" "<=" "<==" "<=>" "<=<" "<<-" + "<<=" "<~>" "<~~" "~~>" ">&-" "<&-" "&>>" "&>" "->" "-<" "-~" ".=" "!=" + "#_" "/=" "|=" "|>" "==" "=>" ">-" ">=" "<-" "<|" "<~" "~-" "~@" "~=" + "~>" "~~" + + ;; whitespace ligatures + "---" "..." "{|" "[|" ".?" "::" ":::" "::=" ":=" + ":>" ":<" "\;\;" "!!" "!!." "!!!" "?." "?:" "??" "?=" "**" "***" "*>" + "*/" "--" "#:" "#!" "#?" "##" "###" "####" "#=" "/*" "/>" "//" "/**" + "///" "$(" ">&" "<&" "&&" "|}" "|]" "$>" ".." "++" "+++" "+>" "=:=" + "=!=" ">:" ">>" ">>>" "<:" "<*" "<*>" "<$" "<$>" "<+" "<+>" "<>" "<<" + "<<<" "" "^=" "%%")) + (ligature-set-ligatures 'prog-mode maple-ligatures) + (global-ligature-mode t) ''; };