;; -*- lexical-binding: t; -*- ;; Fix Emacs' bad defaults (use-package emacs :init ;; Save backups and autosaves in a centralized place (defvar autosave-directory (expand-file-name "autosaves" user-emacs-directory)) (defvar backup-directory (expand-file-name "backups" user-emacs-directory)) (make-directory autosave-directory t) (setq auto-save-file-name-transforms `((".*" ,autosave-directory t)) backup-directory-alist `(("." . ,backup-directory))) (setq read-process-output-max (* 1024 1024)) (setq-default indent-tabs-mode nil) ;; Always display line numbers in text/programming modes (add-hook 'prog-mode-hook #'display-line-numbers-mode) (add-hook 'text-mode-hook #'display-line-numbers-mode) :custom (require-final-newline t) (tab-always-indent 'complete) (ring-bell-function 'ignore) (enable-recursive-minibuffers t) (vc-follow-symlinks t) (display-line-numbers-type 'visual) (even-window-sizes nil) (fill-column 110) (unique-buffer-name-style 'forward)) (provide 'init-defaults)