dot-emacs

My emacs dotfiles/config
git clone git://git.ethandl.dev/dot-emacs
Log | Files | Refs

commit 4fe218de5a555e55c0a097bfff596f3afdf32d1c
parent bc8fcaf0ee3bfa5931a4184f498eef74b91f938f
Author: Ethan Long <Ethan.Long@anu.edu.au>
Date:   Sun, 21 May 2023 14:22:05 +1000

Some final modifications for ligatures
Apparently Victor mono is different to Comic Code in terms of ligs

Diffstat:
Minit.el | 72++++++++++++++++++++++++++++++++----------------------------------------
1 file changed, 32 insertions(+), 40 deletions(-)

diff --git a/init.el b/init.el @@ -21,14 +21,12 @@ (setq catppuccin-flavor 'mocha) (catppuccin-reload) - ;; Get rid of default crud (setq inhibit-startup-screen t) -(if (not (eq system-type 'darwin)) - (progn - (menu-bar-mode 0) - (tool-bar-mode 0) - (scroll-bar-mode 0))) +(unless (eq system-type 'darwin) + (menu-bar-mode 0) + (tool-bar-mode 0) + (scroll-bar-mode 0)) ;; Modeline line and col number (line-number-mode 1) (column-number-mode 1) @@ -57,42 +55,36 @@ (custom-set-fonts) (add-hook 'after-make-frame-functions 'custom-set-fonts) +(setq comic-code-ligs '(("-" (rx (+ "-"))) ("-" (rx (* "-") ">")) + ("+" (rx (+ "+"))) ("<" (rx (+ "="))) + ("<" (rx (+ "=") ">")) ("<" (rx (+ "~"))) + ("<" (rx (+ "~") ">")) ("<" (rx "!" (+ "-"))) + ("<" (rx (+ "-"))) ("<" (rx (+ "-") ">")) ("<" (rx "|")) + (">" (rx (+ "="))) (">" (rx ">" (+ "="))) + (">" (rx ">" (+ "=") ">")) (">" (rx (+ "-"))) + (">" (rx (+ "-") "<")) ("~" (rx (+ "~"))) + ("~" (rx (+ "~") ">")) ("=" (rx (* "=") ">")) + ("=" (rx (+ (or ">" "<" "|" "/" "~" ":" "!" "=")))) + "!=" "!==" "[|" "|]" "{|" "|}" "|>" "||" "&&")) + +(setq victor-mono-ligs '("</" "</>" "/>" "~-" "-~" "~@" "<~" "<~>" "<~~" "~>" + "~~" "~~>" ">=" "<=" "<!--" "##" "###" "####" "|-" "-|" + "|->" "<-|" ">-|" "|-<" "|=" "|=>" ">-" "<-" "<--" + "-->" "->" "-<" ">->" ">>-" "<<-" "<->" "->>" "-<<" + "<-<" "==>" "=>" "=/=" "!==" "!=" "<==" ">>=" "=>>" + ">=>" "<=>" "<=<" "<<=" "=<<" ".-" ".=" "=:=" "=!=" + "==" "===" "::" ":=" ":>" ":<" ">:" ";;" "<|" "<|>" + "|>" "<>" "<$" "<$>" "$>" "<+" "<+>" "+>" "?=" "/=" + "/==" "/\\" "\\/" "__" "&&" "++" "+++")) + ;; Font ligatures: (if (not (eq system-type 'darwin)) (use-package ligature :ensure t :config - (ligature-set-ligatures 'prog-mode '(("-" (rx (+ "-"))) - ("-" (rx (* "-") ">")) - ("+" (rx (+ "+"))) - ("<" (rx (+ "="))) - ("<" (rx (+ "=") ">")) - ("<" (rx (+ "~"))) - ("<" (rx (+ "~") ">")) - ("<" (rx "!" (+ "-"))) - ("<" (rx (+ "-"))) - ("<" (rx (+ "-") ">")) - ("<" (rx "|")) - (">" (rx (+ "="))) - (">" (rx ">" (+ "="))) - (">" (rx ">" (+ "=") ">")) - (">" (rx (+ "-"))) - (">" (rx (+ "-") "<")) - ("~" (rx (+ "~"))) - ("~" (rx (+ "~") ">")) - ("=" (rx (* "=") ">")) - ("=" (rx (+ (or ">" "<" "|" "/" "~" ":" "!" "=")))) - "!=" - "!==" - "[|" - "|]" - "{|" - "|}" - "|>" - "||" - "&&" - )) + (ligature-set-ligatures 'prog-mode victor-mono-ligs) (global-ligature-mode t)) + ;; Else, on mac we have ligatures already (mac-auto-operator-composition-mode)) ;; Rainbow delimiters: @@ -111,7 +103,7 @@ :hook (after-init . doom-modeline-mode)) ;; Tweak these when bored or if pissed off at the modeline ;;(setq all-the-icons-scale-factor 1.2) -(setq doom-modeline-height 41) ;; The default (40) causes it to change size with saving >:( +;;(setq doom-modeline-height 40) ;; The default (40) causes it to change size with saving >:( ;; Which key (this is the thing responsible for coming up with the minibuffer of keys that you can pick): @@ -170,9 +162,9 @@ ;; TAB cycle if there are only a few candidates (setq completion-cycle-threshold 3)) -(if (not (eq system-type 'darwin)) - ;; Change the default scroll behaviour to smooth scroll - (pixel-scroll-precision-mode t)) +(unless (eq system-type 'darwin) + ;; Change the default scroll behaviour to smooth scroll + (pixel-scroll-precision-mode t)) ;; Scrolling down a file only goes down a single line when reaching the bottom (setq scroll-step 1) ;; The region that the curser needs to enter to trigger scrolling