dotfiles/doom/config.el
2024-03-19 16:37:52 -04:00

56 lines
2.1 KiB
EmacsLisp

;;; $DOOMDIR/config.el -*- lexical-binding: t; -*-
(setq user-full-name "Roman Godmaire"
user-mail-address "godmaire@twilit.com")
(setq doom-theme 'doom-gruvbox)
(setq display-line-numbers-type 'relative)
;; Doom exposes five (optional) variables for controlling fonts in Doom:
;;
;; - `doom-font' -- the primary font to use
;; - `doom-variable-pitch-font' -- a non-monospace font (where applicable)
;; - `doom-big-font' -- used for `doom-big-font-mode'; use this for
;; presentations or streaming.
;; - `doom-unicode-font' -- for unicode glyphs
;; - `doom-serif-font' -- for the `fixed-pitch-serif' face
;;
;; If you or Emacs can't find your font, use 'M-x describe-font' to look them
;; up, `M-x eval-region' to execute elisp code, and 'M-x doom/reload-font' to
;; refresh your font settings. If Emacs still can't find your font, it likely
;; wasn't installed correctly. Font issues are rarely Doom issues!
(setq doom-font (font-spec :family "Hack Nerd Font Mono" :size 14 :weight 'regular))
;; Here are some additional functions/macros that will help you configure Doom.
;;
;; - `load!' for loading external *.el files relative to this one
;; - `use-package!' for configuring packages
;; - `after!' for running code after a package has loaded
;; - `add-load-path!' for adding directories to the `load-path', relative to
;; this file. Emacs searches the `load-path' when you load packages with
;; `require' or `use-package'.
;; - `map!' for binding new keys
;; Load all *.el files in config/
(let* ((config-dir (concat doom-user-dir "config"))
(config-files (directory-files-recursively config-dir "\.el")))
(dolist (file config-files)
(load! file doom-user-dir)))
;; Elfeed
(add-hook! 'elfeed-search-mode-hook #'elfeed-update)
;; Dired config
(add-hook 'dired-after-readin-hook 'dired-git-info-auto-enable)
;; Zen config
(add-hook 'writeroom-mode-enable-hook
(lambda () (display-line-numbers-mode -1)))
(add-hook 'writeroom-mode-disable-hook
(lambda () (display-line-numbers-mode)))
;; Wakatime
(global-wakatime-mode)
;; Formatters
(set-formatter! 'ruff '("ruff" "format" "-q" "-") :modes '(python-mode))