;; Set custom file to be somewhere else. (setq custom-file "~/.emacs.d/custom.el") (load custom-file) ;; Include packages stored locally. (add-to-list 'load-path "~/.emacs.d/local-packages") (setq insert-directory-program "gls") ;; Avoid asking confirmation when killing a buffer with a process. (setq kill-buffer-query-functions nil) (require 'package) ;; Specify repositories. (setq package-archives '(("melpa" . "https://melpa.org/packages/") ("org" . "https://orgmode.org/elpa/") ("elpa" . "https://elpa.gnu.org/packages/"))) (package-initialize) (unless package-archive-contents (package-refresh-contents)) ;; Install use-package if not present (unless (package-installed-p 'use-package) (package-install 'use-package)) (require 'use-package) ;; Avoid using :ensure t on every package installation. (setq use-package-always-ensure t) (setq inhibit-startup-message t) ;; Always start as a full frame. (add-to-list 'default-frame-alist '(fullscreen . maximized)) ;; Set right command key to meta. (setq ns-right-command-modifier 'meta) (scroll-bar-mode -1) ;; Disable visible scrollbar. (tool-bar-mode -1) ;; Disable the toolbar. (tooltip-mode -1) ;; Disable tooltips. (set-fringe-mode 10) ; Breathing room for windows. ;; Set up the visible bell. (setq visible-bell nil ring-bell-function 'flash-mode-line) (defun flash-mode-line () (invert-face 'mode-line) (run-with-timer 0.1 nil #'invert-face 'mode-line)) ;; Do not center cursor after scroll. (setq scroll-conservatively 101) (set-face-attribute 'default nil :font "Fira Code Retina") ;; Enable ligatures for fonts that allow it (Fira Code does). ;; The ligature package is locally installed. ;; Ligatures cause problems with python, I could find out which ones do and avoid them. ;; (use-package ligature ;; :ensure nil ;; :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 Code ligatures in programming modes ;; (ligature-set-ligatures '(prog-mode org-mode) ;; Be careful to not use the asterisk ligatures becase they interfere with org mode. ;; '("www" "**/" "*>" "*/" "\\\\" "\\\\\\" "{-" "::" ;; ":::" ":=" "!!" "!=" "!==" "-}" "-->" "->" "->>" ;; "-<" "-<<" "-~" "#{" "#[" "##" "###" "####" "#(" "#?" "#_" ;; "#_(" ".-" ".=" ".." "..<" "..." "?=" "??" ";;" "/*" "/**" ;; "/=" "/==" "/>" "//" "///" "&&" "||" "||=" "|=" "|>" "^=" "$>" ;; "++" "+++" "+>" "=:=" "==" "===" "==>" "=>" "=>>" "<=" ;; "=<<" "=/=" ">-" ">=" ">=>" ">>" ">>-" ">>=" ">>>" "<*" ;; "<*>" "<|" "<|>" "<$" "<$>" "