;;; .doom.d/config.el -*- lexical-binding: t; -*- ;; Place your private configuration here ;; ;; Load appearance configuration (load! "+ui") ;; Set projects directories (setq projectile-project-search-path '("~/Projects")) ; Auto cleanup recentf (setq recentf-auto-cleanup 300) ; Save backup files to ~/.cache and autosave files to ~/.cache/emacs (setq backup-directory-alist `(("." . "~/.cache")) auto-save-list-file-prefix (concat "~/.cache/emacs")) ;; Set Magit repositories (setq magit-repository-directories '(("~/Projects" . 3) ("~/.dotfiles" . 0) ("~/.doom.d" . 0))) ;; Load org configuration (after! org (load! "+org")) ;; Enter writeroom and disable completion and line numbers in Markdown (add-hook 'markdown-mode-hook (lambda () (display-line-numbers-mode -1))) (after! markdown (set-company-backend! 'markdown-mode nil) (add-hook 'markdown-mode-hook 'global-writeroom-mode)) ;; Reload file from disk without confirmation (defun revert-buffer-no-confirm () (interactive) (revert-buffer :ignore-auto :noconfirm)) ;; Select target in Makefile compilation as default (map! :leader :n "c c" #'makefile-executor-execute-project-target) ;; Set docsets for each language (after! python (set-docsets! 'python-mode "Python 3" "NumPy" "Pandas")) (after! c++ (set-docsets! 'c++-mode "C++")) (after! go (set-docsets! 'go-mode "Go")) ;; Align columns in CSV mode (add-hook 'csv-mode-hook 'csv-align-mode) ;; Close compilation buffer if successful (setq compilation-finish-functions (lambda (buf str) (if (null (string-match ".*exited abnormally.*" str)) (progn (run-at-time "0.5 sec" nil 'delete-windows-on (get-buffer-create "*compilation*")) (message "No Compilation Errors!"))))) ;; Enable writeroom for text modes (setq writeroom-major-modes '(markdown-mode org-mode))