2019-12-03 23:21:32 +01:00
|
|
|
;;; .doom.d/config.el -*- lexical-binding: t; -*-
|
|
|
|
|
|
|
|
;; Place your private configuration here
|
2019-12-04 04:42:19 +01:00
|
|
|
;;
|
|
|
|
;; Set Font and theme
|
2019-12-03 23:21:32 +01:00
|
|
|
(setq doom-font (font-spec :family "Iosevka" :size 16))
|
2019-12-04 04:42:19 +01:00
|
|
|
(setq doom-theme 'doom-city-lights)
|
|
|
|
;; Start maximized
|
|
|
|
(add-to-list 'default-frame-alist '(fullscreen . maximized))
|
2019-12-04 04:43:02 +01:00
|
|
|
;; Set projects directories
|
|
|
|
(setq projectile-project-search-path '("~/Sync/Projects"))
|
|
|
|
;; Close compilation buffer if it went well
|
|
|
|
(setq compilation-finish-function
|
|
|
|
(lambda (buf str)
|
|
|
|
(if (null (string-match ".*exited abnormally.*" str))
|
|
|
|
(progn
|
|
|
|
(run-at-time
|
|
|
|
"1 sec" nil 'delete-windows-on
|
|
|
|
(get-buffer-create "*compilation*"))
|
|
|
|
(message "No Compilation Errors!")))))
|
|
|
|
; Auto cleanup recentf
|
|
|
|
(setq recentf-auto-cleanup 180)
|
|
|
|
; Save backup files to ~/.cache and autosave files to ~/.cache/emacs
|
|
|
|
(setq backup-directory-alist `(("." . "~/.cache")))
|
|
|
|
(setq auto-save-list-file-prefix
|
|
|
|
(concat "~/.cache/emacs"))
|
2019-12-07 20:17:29 +01:00
|
|
|
;; Set Magit repositories
|
|
|
|
(setq magit-repository-directories '(("~/Projects" . 2)
|
|
|
|
("~/.dotfiles" . 0)
|
|
|
|
("~/.doom.d" . 0)))
|
|
|
|
;; Display Magit status in fullscreen
|
|
|
|
(after! magit
|
|
|
|
(setq magit-display-buffer-function #'magit-display-buffer-fullframe-status-v1))
|
2019-12-07 20:16:04 +01:00
|
|
|
;; Load org configuration
|
|
|
|
(after! org (load! "+org"))
|
2019-12-07 20:17:29 +01:00
|
|
|
;; Disable line numbers in Markdown
|
|
|
|
(add-hook 'markdown-mode-hook (lambda () (display-line-numbers-mode -1)))
|
|
|
|
;; Reload file from disk without confirmation
|
|
|
|
(defun revert-buffer-no-confirm ()
|
|
|
|
(interactive)
|
|
|
|
(revert-buffer :ignore-auto :noconfirm))
|